Ali Dehghan

Frédéric Havet

On the semi-proper orientations of graphs

A weighted orientation of a graph G is a pair (D, w) where D is an orientation of G and w is an arc-weighting of D, that is an application A(D) → N \ {0}. The in-weight of a vertex v in a weighted orientation (D, w), denoted by S (D,w) (v), is the sum of the weights of arcs with head v in D. A semi-proper orientation is a weighted orientation such that two adjacent vertices have different in-weights. The semiproper orientation number of a graph G, denoted by

In this work, we show that every graph G has an optimal semi-proper orientation (D, w) such that the weight of each arc is 1 or 2. We then give some bounds on the semi-proper orientation number: we show

for all graph G, where Mad(G) and δ * (G) are the maximum average degree and the degeneracy of G, respectively. We then deduce that the maximum semi-proper orientation number of a tree is 2, of a cactus is 3, of an outerplanar graph is 4, and of a planar graph is 6. Finally, we consider the computational complexity of associated problems: we show that determining whether -→ χs(G) = χ(G) is NP-complete for planar graphs G with -→ χs(G) = 2; we also show that deciding whether -→ χs(G) ≤ 2 is NP-complete for planar bipartite graphs G.

Introduction

Terminology and notation generally follow [START_REF] West | Introduction to graph theory[END_REF]. However some standard definitions that are relevant for this paper as well as non-usual definitions are given in Section 2. The graphs have no parallel edges and no loops and the digraphs have no parallel arcs and no loops. We denote by [n] the set of integers {1, . . . , n}.

Proper orientation

An orientation of a graph G is proper if any two adjacent vertices have different in-degrees. The proper orientation number of a graph G, denoted by -→ χ (G), is the minimum of the maximum in-degree taken over all proper orientations of the graph G. In other words, the values of the in-degrees define a proper vertex colouring of G. Thus,

χ(G) -1 ≤ - → χ (G) ≤ ∆(G) (1)
The existence of proper orientations was implicitly demonstrated by Borowiecki, Grytczuk and Pilśniak in [START_REF] Borowiecki | Coloring chip configurations on graphs and digraphs[END_REF], who established -→ χ (G) ≤ ∆(G). Afterwards, the proper orientation number was introduced in [START_REF] Ahadi | The complexity of the proper orientation number[END_REF]. Since then, the proper orientation number has been studied by several authors, for instance see [START_REF] Ahadi | The complexity of the proper orientation number[END_REF][START_REF] Ahadi | Is there any polynomial upper bound for the universal labeling of graphs?[END_REF][START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF][START_REF] Araujo | Proper orientation of cacti[END_REF][START_REF] Araújo | Weighted proper orientations of trees and graphs of bounded treewidth[END_REF][START_REF] Knox | Proper orientations of planar bipartite graphs[END_REF].

In [START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF], it is shown that the proper orientation number of a tree is at most 4 and that there exists a tree whose proper orientation number is at most 4. A natural question is to ask how it can be generalized.

Problem 1.1. Which graph classes containing the trees have bounded proper-orientation number?

Araujo et al. [START_REF] Araujo | Proper orientation of cacti[END_REF] proved that this is the case for cacti (their proper orientation number is bounded by [START_REF] Bennett | Weak and strong versions of the 1-2-3 conjecture for uniform hypergraphs[END_REF], but left open the question for the class of outerplanar graphs. The question for the more general class of planar graphs was already asked in [START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF]. Problem 1.2.

• Does there exists a constant c 1 such that χ(G) ≤ c 1 for every outerplanar graph G?

• Does there exists a constant c 2 such that χ(G) ≤ c 2 for every planar graph G?

In [START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF], the authors also asked the following problem.

Problem 1.3. Is the proper-orientation number upper bounded by a function of the treewidth or the maximum average degree?

Those questions seem highly non-trivial. One of the reasons is that, contrary to many other parameters like the chromatic number, the proper-orientation number is not monotonic. Recall that a graph parameter γ is monotonic if γ(H) ≤ γ(G) for every (induced) subgraph H of G.

We should mention that interest in proper orientations stems from their connection to the 1-2-3 Conjecture [START_REF] Karoński | Edge weights and vertex colours[END_REF] that says: "If G is a graph with no connected component having exactly two vertices, then its edges can be assigned weights from {1, 2, 3} so that adjacent vertices have different sums of incident edge weights". For more information about 1-2-3-Conjecture and its variants see [START_REF] Ahadi | Computation of lucky number of planar graphs is NP-hard[END_REF][START_REF] Bennett | Weak and strong versions of the 1-2-3 conjecture for uniform hypergraphs[END_REF][START_REF] Cranston | The 1, 2, 3-conjecture and 1, 2-conjecture for sparse graphs[END_REF][START_REF] Seamone | Sequence variations of the 1-2-3 conjecture and irregularity strength[END_REF].

Semi-proper Orientation

Motivated by the proper orientations and the 1-2-3 Conjecture, we investigate the semi-proper orientations. A weighted orientation of graph G is a pair (D, w) where D is an orientation of G and w is an arc-weighting A(D) → N\{0}. A semi-proper orientation is a weighted orientation such that for every two adjacent vertices u and v, S (D,w) (v) = S (D,w) (u), where S (D,w) (x) is the sum of the weights of arcs with head x in D. The semi-proper orientation number of a graph G, denoted by -→ χ s (G), is min (D,w)∈Γ max v∈V (G) S (D,w) (v), where Γ is the set of all semi-proper orientations of G. Every proper orientation of a graph G is a semi-proper orientation where the weight of each arc is 1. Consequently, by [START_REF] Ahadi | The complexity of the proper orientation number[END_REF], we have

χ(G) -1 ≤ - → χ s (G) ≤ - → χ (G) ≤ ∆(G) (2)
A semi-proper orientation (D, w) is optimal if max v∈V (G) S (D,w) (v) = -→ χ s (G).

In this work, we first show that every graph G has an optimal semi-proper orientation (D, w) such that for each arc a ∈ A(D), we have w(a) ∈ {1, 2}.

Theorem 1.4. Every graph has an optimal semi-proper orientation such that the weight of each arc is 1 or 2.

In Section 4, we prove that the semi-proper orientation number is monotonic. Next, in Section 5, we give some bounds on -→ χ s . We first establish the following bounds in terms of the maximum average degree Mad and the chromatic number χ of the graph.

Theorem 1.5. Mad(G) 2 ≤ -→ χ s (G) ≤ Mad(G) 2 + χ(G) -1 for any graph G.
A planar graph is a graph that can be drawn on the plane in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cross each other. An outerplanar graph is a graph that has a planar drawing for which all vertices belong to the outer face of the drawing. A planar graph has maximum average degree less than 6 and chromatic number at most 4; an outerplanar graph has maximum average degree less than 4, and chromatic number at most 3; a tree has maximum average degree less than 2, and chromatic number at most 2. Hence Theorem 1.5 immediately yields the following, which answers in the affirmative to the analogue of Problem 1.2 for -→ χ s .

Corollary 1.6. (i) -→ χ s (G) ≤ 6 for every planar graph G.

(ii) -→ χ s (G) ≤ 4 for every outerplanar graph G.

(iv) -→ χ s (T ) ≤ 2 for every tree T .

A graph G is a cactus if every 2-connected component of G is either an edge or a cycle. Clearly, every cactus is an outerplanar graph, so its semi-proper orientation number is at most 4. However, one shows in Subsection 5.2 that it is indeed at most 3.

In Subsection 5.3, we derive the following bounds in terms of the degeneracy δ * and treewidth tw.

Theorem 1.7. δ * (G)+1 2 ≤ -→ χ s (G) ≤ 2δ * (G) ≤ 2 tw(G) for every graph G.
In Section 6, we show that the above upper bounds are tight. More specifically, we prove that the following types of graphs exist.

• planar graphs G with -→ χ s (G) = 6 (Proposition 6.1).

• outerplanar graphs G with -→ χ s (G) = 4 (Proposition 6.3).

• cacti C with -→ χ s (C) = 3 (Proposition 6.5).

• k-degenerate graphs G with -→ χ s (G) ≤ 2k for every positive integer k (Proposition 6.6).

Next, we consider the complexity aspects of the semi-proper orientation number. By definition -→ χ s ≤ χ and there are many graphs whose proper orientation number is greater than their semi-proper orientation number (for example the trees with proper orientation number 4). We first show that it is NP-complete to decide whether a planar graph G satisfies -→ χ s (G) = χ(G). More precisely we show the following.

Theorem 1.8. It is NP-complete to decide whether a given planar graph G with -→ χ s (G) = 2 has a proper orientation number 2.

It was shown [START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF] that it is NP-complete to decide whether the proper orientation number of a given planar bipartite graph is less than or equal to 3. We improve this hardness result for semi-proper orientation number and proper orientation number of bipartite graphs. Theorem 1.9. (1) It is NP-complete to decide whether a given planar bipartite graph G satisfies -→ χ s (G) ≤ 2.

(2) It is NP-complete to decide whether a given planar bipartite graph G satisfies -→ χ (G) ≤ 2.

This shows that determining the semi-proper orientation number of a graph is NP-hard. However, since the degeneracy can be computed in polynomial-time, Theorem 1.7 implies that the semi-proper orientation number can be 4-approximated. Moreover, we describe in the proof of this theorem, a simple greedy procedure that returns a semi-proper orientation (D, w) of a graph G with maximum in-weight at most 2δ * (G) ≤ 2 -→ χ s (G).

Definitions and preliminaries

Let D be a digraph. If (u, v) is an arc, we say that u dominates v and write u → v. The tail of (u, v) is u and its head is v. Let v be a vertex of D. The out-neighbourhood of v, denoted by Let G be a graph. A (proper) k-colouring of G is a mapping c : V (G) → {1, . . . , k} such that c(u) = c(v) for every edge uv ∈ E(G). The chromatic number of G, denoted by χ(G), is the minimum k such that G admits a k-colouring.

N + D (v), is the set of vertices u such that v → u. The in-neighbourhood of v, denoted by N - D (v), is the set of vertices u such that u → v. The out-degree d + D (x) (resp. the in-degree d - D (x)) is |N + D (v)| (resp. |N - D (v)|). The maximum in-degree of D is ∆ -(D) = max{d - D (x) | x ∈ V (D)}.
Consider a graph G = (V, E), and let S ⊂ V be any subset of vertices of G. Then, the induced subgraph on the set of vertices S, denoted by G V (S) , is the graph whose vertex set is S and whose edge set consists of all the edges in E that have both endpoints in S.

The average degree of G is Ad(G) = 1

|V (G)| v∈V (G) d(v) = 2|E(G)| |V (G)| . The maximum average degree of G Mad(G) = max{Ad(H) | H is a subgraph of G}.
We say that a graph G is k-degenerate if each of its subgraphs has a vertex of degree at most k. The degeneracy of G, denoted by δ * (G), is the minimum integer k such that G is k-degenerate. In symbols,

δ * (G) = max{δ(H) | H is a subgraph of G}, where δ(H) is the minimum degree of H. It is well-known that δ * (G) ≤ Mad(G) ≤ 2δ * (G).
Moreover, it is folklore that every graph has an ordering (v 1 , . . . , v n ) of its vertices such that v i has at most δ * (G) neighbours in {v 1 , . . . , v i-1 } for all 2 ≤ i ≤ n. In particular, it implies that

χ(G) ≤ δ * (G) + 1.
A set A of vertices is complete to another set B if ab is an edge for all a ∈ A and b ∈ B. A vertex v in a graph G is k-simpilicial if it has degree k and its neighbours form a clique. A graph G is a k-tree if either G = K k+1 (the complete graph on k + 1 vertices), or G contains a k-simplicial vertex v and G -v is also a k-tree. The treewidth tw(G) of a graph G can be defined as follows:

tw(G) = min{k | G is a spanning subgraph of a k-tree}.
By definition, every k-tree is k-degenerate, and so are all its subgraphs. Hence for every graph G we have

δ * (G) ≤ tw(G).
An orientation D of a graph G is a digraph obtained from the graph G by replacing each edge by exactly one of the two possible arcs with the same endvertices. A weighted orientation of G is a weighted digraph (D, w) where D is an orientation of G. A semi-proper orientation of G is a weighted orientation of G that is semi-proper. The semi-proper orientation number, denoted by -→ χ s (G), is the minimum of the maximum in-weight over all semi-proper orientations of G:

-→ χ s (G) = min {Σ(D, w) | (D, w) is a semi-proper orientation of G} = min {µ(D) | D is an orientation of G}
3 Optimal semi-proper orientation with weights in {1, 2}

In this section, we prove Theorem 1.4 which states that every graph has an optimal semi-proper orientation such that the weight of each arc is 1 or 2.

Proof of Theorem 1.4. We prove the theorem by contradiction.

In an optimal semi-proper orientation of G, if the weight of an arc a is greater than 2, then we say that a is bad. Let t be the minimum number of bad arcs in an optimal semi-proper orientation of G, and let F be the set of optimal semi-proper orientations with exactly t bad arcs.

Suppose for a contradiction that t > 0. Let (D, w) be an optimal semi-proper orientation in F such that the sum of the weights of the bad arcs is minimum. Let b be the sum of the weights of bad arcs in (D, w).

Let uv be a bad arc in (D, w). Let R v be the set of vertices z such that there is a directed path from v to z in D. Among all vertices in R v let p be a vertex with minimum in-weight. (i.e. S (D,w) (p) = min{S (D,w) (z)|z ∈ R v }). We distinguish two cases.

Case 1. S (D,w) (p) = S (D,w) (v). In this case, the in-weight of v is minimum over all vertices in R v . Let u 1 , . . . , u k be the in-neighbours of v. Without loss of generality assume that u = u 1 . Also, let o 1 , . . . , o r be the out-neighbours of v. So, we have o

1 , . . . , o r ∈ R v . Claim 3.1. S (D,w) (v) < S (D,w) (o i ) for all i ∈ [r]. Proof. Let i ∈ [r]. By our assumption S (D,w) (v) ≤ S (D,w) (o i ), and since S (D,w) is a proper colouring, S (D,w) (v) = S (D,w) (o i ). Hence S (D,w) (v) < S (D,w) (o i ). Claim 3.2. w(u i v) = 2 for all 2 ≤ i ≤ k.
Proof. To the contrary assume that there is 2 ≤ i ≤ k such that w(u i v) = 2. We distinguish two cases.

• If w(u i v) = 1, then consider the arc-weighting w of D defined by w (a) =      w(uv) -1, if a = uv, w(u i v) + 1, if a = u i v, w(a), otherwise.
Clearly, (D, w ) is an optimal semi-proper orientation that has at most t bad arcs and also the sum of the weights of its bad arcs is less than b. This is a contradiction.

• If w(u i v) > 2, consider the arc-weighting w of D defined by w (a) =      1, if a = uv, w(u i v) + w(uv) -1, if a = u i v, w(a), otherwise.
Clearly, (D, w ) is an optimal semi-proper orientation with t -1 bad arcs, a contradiction. This completes the proof of Claim 3.2.

Claim 3.3. S (D,w) (o i ) > 2k + 1 for all i ∈ [r].
Proof. We have w(u 1 v) = α > 2, so by Claim 3.2, we have S (D,w) (v) > 2k. Thus, by Claim 3.1, we have

S (D,w) (o i ) > 2k + 1.
Now, we are ready to obtain a contradiction for Case 1. Let q be such that k ≤ q ≤ 2k and q / ∈ {S (D,w) (u i ) :

1 ≤ i ≤ k}. For each arc u i v, 1 ≤ i ≤ k, we choose V ar(u i v) in {1, 2} such that k i=1 V ar(u i v) = q.
This is clearly possible. Now let w be the arc-weighting of D defined by

w (a) = V ar(u i v), if a = u i v, 1 ≤ i ≤ k, w(a), otherwise.
By Claim 3.3, and the way that we choose q, it is clear that (D, w ) is an optimal semi-proper orientation with t -1 bad arcs, a contradiction.

Case 2. S (D,w) (p) = S (D,w) (v)
. By the definition of R v there is a directed path P = (v, z 1 , . . . , z l , p) from the vertex v to the vertex p. Let u 1 , . . . , u k be the in-neighbours of p. Without loss of generality assume that z l = u 1 . (Note that we can have the case where the only directed path from v to p is the arc vp. In that case we assume that u 1 = v.) Next, let o 1 , . . . , o r be the out-neighbours of p.

Claim 3.4. S (D,w) (p) ≥ w(u 1 p) + 2k -3.
Proof. To the contrary suppose that S (D,w) (p) ≤ w(u 1 p) + 2k -4. So there are distinct indices j, j greater than 1 such that w(u j p) = w(u j p) = 1. We are going to reverse the arcs in P, changing the weights of some arcs to ensure that the in-weights of vertices remain unchanged. More specifically, let D be the orientation of G obtained from D by reversing the arcs of P and let w be the arc-weighting of D defined as follows:

w (a) =                              w(uv) -1, if a = uv, 1, if a = z 1 v, w(vz 1 ), if a = z 2 z 1 , w(z i-1 z i ), if a = z i+1 z i , 2 ≤ i < l, w(z l-1 z l ), if a = pz l , 2, if a = u j p, w(u 1 p), if a = u j p w(a),
otherwise.

Note that for every vertex f we have S (D,w) (f ) = S (D ,w ) (f ). Thus (D , w ) is an optimal semi-proper orientation of G. Moreover it has at most t bad arcs and the sum of the weights of the bad arcs is b -1. This is a contradiction.

Claim 3.5. S (D,w) (o i ) > 2k -2 for all i ∈ [r], and
S (D,w) (z l ) > 2k -2.
Proof. By our assumption the in-weight of p is minimum. Thus,

S (D,w) (p) ≤ S (D,w) (o i ) for all i ∈ [r],
and S (D,w) (p) ≤ S (D,w) (z l ). On the other hand, the function S (D,w) is a proper colouring, so

S (D,w) (p) < S (D,w) (o i ) for all i ∈ [r], and
S (D,w) (p) < S (D,w) (z l ). Now, by Claim 3.4, S (D,w) (p) ≥ 2k -2. Hence S (D,w) (o i ) > 2k -2 for all i ∈ [r], and
S (D,w) (z l ) > 2k -2.
Now, we are ready to obtain a contradiction for Case 2. Let q be such that k -

1 ≤ q ≤ 2k -2 and q / ∈ {S (D,w) (u i ) : 2 ≤ i ≤ k}. For each arc u i v, 2 ≤ i ≤ k, we choose V ar(u i v) in {1, 2} such that k i=1 V ar(u i v) = q.
This is clearly possible. Let D be the orientation of G obtained from D by reversing the arcs of P and let w be the arc-weighting of D defined as follows:

w (a) =                        w(uv) -1, if a = uv, 1, if a = z 1 v, w(vz 1 ), if a = z 2 z 1 , w(z i-1 z i ), if a = z i+1 z i , 2 ≤ i < l, w(z l-1 z l ), if a = pz l , V ar(u i v), if a = u i v, 2 ≤ i ≤ k, w(a), otherwise.
By Claim 3.5, and the way that we choose q, it is clear that (D , w ) is an optimal semi-proper orientation.

Moreover it has at most t bad arcs and the sum of the weights of the bad arcs is at most b-1, a contradiction. This completes the proof of Theorem 1.4.

4 Monotonicity of the semi-proper orientation number

Lemma 4.1. If H is a subgraph of G, then -→ χ s (H) ≤ -→ χ s (G).
Proof. Let (D, w) be an optimal semi-proper orientation of G. Set D be the orientation of H which agrees with D on every edge of H. Let X be the set of vertices of H that have an in-neighbour in D . Note that Y = V (D ) \ X is the set of sources of D . For every vertex x ∈ X choose an arc a x in A(D ) with head x. Let T (x) be the sum of the weights of the arcs of A(D) \ A(D ) with head x. (T (x) = 0 if there is no such arc.) Let us now define a weight function w on the arcs of D as follows: w (a x ) = w(a x ) + T (x) for all x ∈ X, and w (a) = w(a) if a / ∈ {a x | x ∈ X}. Now consider (D , w ). By construction, if x ∈ X then S (D ,w ) (x) = S (D,w) (x) and S (D ,w ) (y) = 0 for all y ∈ Y . Now, because two sources are not adjacent in a digraph, (D , w ) is a semi-proper orientation of H. Moreover, we clearly have max v∈V (H) S (D ,w

) (v) ≤ max v∈V (H) S (D,w) (v) ≤ max v∈V (G) S (D,w) (v) = -→ χ s (G).
5 Bounds on the semi-proper orientation number

Bounds in terms of maximum average degree and chromatic number

The aim of this subsection is to establish Theorem 1.5.

Theorem 5.1. ∆ -(D) ≤ µ(D) ≤ ∆ -(D) + χ(D) -1 for all digraph D. Proof. Let D be a digraph. By definition, d - D (v) ≤ S (D,w) (v) for any arc-weighting w. Thus ∆ -(D) ≤ µ(D). Let (S 1 , . . . , S χ(D) ) be a χ(D)-colouring of D. For i ∈ [χ(D)] and v ∈ S i , let α v be the integer in [χ(D)] such that d - D (v) + α v -1 ≡ i mod χ(D).
Let w be the arc-weighting of D defined as follows. For every vertex v with in-degree at least 1 choose an arc a v with head v; now if a is an arc with head v, set w(a) = α v if a = a v and w(a) = 1 otherwise.

Observe that for every vertex v ∈ S i , either v is a source and

S (D,w) (v) = 0, or S (D,w) (v) = d - D (v)+α v -1 so S (D,w) (v) > 0 and S (D,w) (v) ≡ i mod χ(D). This implies that (D, w) is semi-proper. Moreover, for every vertex v, S (D,w) (v) ≤ d - D (v) + α v -1 ≤ ∆ -(D) + χ(D) -1.
-(G) (resp. m -(G) -1, at most m -(G) -2) in D. Then (X, Y, Z) is a partition of V (G).
Observe that, in D, there is no directed path from X to Z for otherwise reversing the arcs of such a path would result in an orientation of G with maximum in-degree m -(G) and less vertices with in-degree m -(G), a contradiction. Let R be the set of vertices for which there is a directed path to a vertex of Z. By definition Z ⊆ R and by the above observation R ⊆ Y ∪Z. By definition there is no arcs entering R in D, so

|E(G R )| = v∈R d - D (v). Since R ⊆ Y ∪Z and Z is non-empty, we have v∈R d - D (v) > |R| • (m -(G) -1). Thus 1 2 Mad(G) ≥ |E(G R )|/|R| > m -(G) -1, so 1 2 Mad(G) ≥ m -(G).
Proposition 5.3 and Corollary 5.2 immediately imply Theorem 1.5.

Cacti

For every nonnegative integer i, an i-vertex is a vertex of degree i.

Lemma 5.4. Let k ≥ 2 be an integer, G a graph, and

v a 1-vertex in G. -→ χ s (G) ≤ k if and only if -→ χ s (G -v) ≤ k. Proof. By Lemma 4.1, if -→ χ s (G) ≤ k then -→ χ s (G -v) ≤ k.
Let us now prove the reciprocal. Assume that -→ χ s (G -v) ≤ k. Let (D, w) be an optimal semi-proper orientation of G -v. Let u be the neighbour of v in G. We extend it by orienting uv from u to v and choosing w(uv) in {1, 2} \ {S (D,w) (u)}. One easily checks that this yields a semi-proper orientation of G. Hence -→ χ s (G) ≤ k.

Remark 5.5. Note that Lemma 5.4 and an easy induction yields that -→ χ s (T ) ≤ 2 for every tree T .

Lemma 5.6. Let k ≥ 3 be an integer, G a graph, and u, v

two adjacent 2-vertices in G. -→ χ s (G) ≤ k if and only if -→ χ s (G -{u, v}) ≤ k. Proof. By Lemma 4.1, if -→ χ s (G) ≤ k then -→ χ s (G -{u, v}) ≤ k.
Let us now prove the reciprocal. Let u (resp. v ) be the neighbour of u (resp. v) distinct from v (resp. u). Let (D, w) be a semi-proper orientation of G -{u, v}. We shall extend it into a semi-proper orientation of G as follows.

If S (D,w) (u ) = S (D,w) (v ) = 1, then orient u u from u to u, v v from v to v, and uv from u to v and set w(u u) = w(v v) = 2 and w(uv) = 1 to obtain a semi-proper orientation of G.

Henceforth, without loss of generality, we may assume S (D,w) (u ) = 1. Orient u u from u to u, v v from v to v, and uv from u to v and set w(u u) = w(v v) = 1 and w(uv) = 1 if S (D,w) (v ) = 2 and w(uv) = 2 otherwise. One easily checks that this yields a semi-proper orientation of G.

Hence -→ χ s (G) ≤ k. Theorem 5.7. If G is a cactus, then -→ χ s (G) ≤ 3.
Proof. By induction on the number of vertices of G, the result holding trivially if G has one vertex. Assume now that G is a cactus on more than one vertex. Then it has either a 1-vertex or two adjacent 2-vertices. The induction hypothesis and Lemmas 5.4 and 5.6 yield the result.

Bounds in terms of degeneracy

The aim of this subsection is to establish Theorem 1.7 which says that for every graph G, we have

δ * (G)+1 2 ≤ -→ χ s (G) ≤ 2δ * (G). Proof of Theorem 1.7. Let G be a graph. Let us first prove δ * (G)+1 2 ≤ -→ χ s (G). Let (D, w) be an opti- mal semi-proper orientation of G. Let H be a subgraph of G such that δ(H) = δ * (G). H has at least 1 2 δ(H)|V (H)| = 1 2 δ * (G)|V (H)| edges. Thus D V (H) has at least 1 2 δ * (G)|V (H)| arcs. If there is a vertex v of V (H) with in-degree greater than δ * (G)/2 in D V (H) , that is at least δ * (G)+1 2 , then -→ χ s (G) ≥ S (D,w) (v) ≥ d -(v) ≥ δ * (G)+1 2 .
If no vertex of V (H) has in-degree greater than δ * (G)/2 in D V (H) , then every vertex v of V (H) has in-degree exactly δ * (G)/2 , and so every for every vertex v ∈ V (H), we have S (D,w) (v) ≥ δ * (G)/2 . Let x and y be two adjacent vertices in H. Without loss of generality, we may assume that S (D,w) (x) > S (D,w) (y).

Hence S (D,w) (x) > δ * (G)/2 , so S (D,w) (x) ≥ δ * (G)+1 2 . Therefore -→ χ s (G) ≥ δ * (G)+1 2 .
Next, we focus on the second part of the equation. Since χ(G) ≤ δ * (G) + 1 and Mad(G) ≤ 2δ * (G), Theorem 5.1 yields -→ χ s (G) ≤ 2δ * (G). However, we give here a simple and algorithmic proof of

-→ χ s (G) ≤ 2δ * (G)
which shows that one can find a semi-proper orientation of G with maximum in-weight 2δ * (G) using a greedy procedure. This procedure is the following:

1. We first compute an ordering (v 1 , . . . , v n ) of the vertices of G such that v i has at most δ * (G) neighbours in {v 1 , . . . , v i1 } for all 2 ≤ i ≤ n. It is well-known that such an ordering can be easily computed by taking a vertex of minimum degree for v n and apply recursively the procedure on G -v n .

2. Let D be the orientation of G in which every edge is oriented from its lower-indexed endvertex to its higher indexed vertex (i.e. if v i v j i is an edge and i < j, then v i v j ∈ A(D)). (a) For k = 1, the empty arc-weighting w 1 is fine.

(b) For k > 2, then set w k (a) = w k-1 (a) for every arc of a ∈ A(D k-1 ). Let v i1 , . . . , v ip be the in-neighbours of v k in {v 1 , . . . , v k-1 }. By construction, we know that p ≤ δ * (G). One can choose

w k (v i1 v k ), . . . , w k (v ip v k ) in {1, 2} such that S(D k , w k )(v k ) = p =1 w(v i v k ) = S (D k-1 ,w k-1 ) (v ij ) = S (D k ,w k ) (v ij )
for all 1 ≤ j ≤ p. This is possible because there are p + 1 possible values for S(D k , w k )(v k ) (all integers between p and 2p) and only p forbidden ones. Moreover

S(D k , w k )(v k ) ≤ 2p ≤ 2δ * (G). 4. Return (D, w n ).
6 Tightness of the bounds Proposition 6.1. There exists a planar graph G such that -→ χ s (G) ≤ 6.

Proof. For every triangulation T , we define by T + the triangulation obtained by adding a vertex in each face and joining it to the three vertices incident to the face. Let T 0 be the triangle. For every i ∈ N, let T i = T + i-1 . Note that if i < j, then T i is a subgraph of T j . We shall prove that -→ χ s (T 44 ) = 6. Assume for a contradiction that there is a semi-proper orientation (D, w) of T 44 with Σ(D, w) ≤ 5. The minimum weight of an edge uv is m(uv) = min{S (D,w) (u), S (D,w) (v)}). Let B 1 be the triangle and for each i > 1 let B i = B(B i-1 ). See Figure 1. For every positive integer i, we denote by C i the outer cycle of B i . We shall prove that -→ χ s (B 6 ) ≥ 4. For every interior edge e = xy (i.e. which is not in C 6 ), let P 6 be the subpath of C 6 with end-vertices x and y and containing z xy . The bud of e, denoted by B(e), is the subgraph of B 6 induced by V (P 6 ) that is the outerplanar graph with outer face P 6 ∪ {e}.

Suppose for a contradiction that B 6 admits a semi proper orientation (D, w) with Σ(D, w) ≤ 3. An interior edge e = xy of C i (for some i ∈ (ii) There is no (0, 3)-or (1, 3)-dominating edge in B 4 .

[5]) is dominating if there is no arc from V (B(e)) \ {x, y} into {x, y} in D. An edge xy is (k 1 , k 2 )-dominating if it is dominating and S (D,w) (x) = k 1 and S (D,w) (y) = k 2 . A (k 1 , k 2 , k 3 )-triangle
(iii) There is no (0, 2)-or (1, 2)-dominating edge in B 3 .

(iv) There is no (1, 2, 3)-triangle in B 2 .

Proof. (i) Assume for a contradiction that an edge xy ∈ E(B 5 ) is (2, 3)-dominating. Then z xy is dominated by both x and y. So S (D,w) (z xy ) ≥ 2. This is a contradiction because it is adjacent to a vertex with in-weight 2 (namely x) and to a vertex with in-weight 3 (namely y).

(ii) Assume for a contradiction that an edge xy ∈ E(B 4 ) is (0, 3)-or (1, 3)-dominating. Then z xy is dominated by both x and y and so S (D,w) (z xy ) = 2, because S (D,w) (y) = 3. But then the edge z xy y is (2, 3)-dominating and in E(B 5 ), a contradiction with (i).

(iii) Assume for a contradiction that an edge xy ∈ E(B 3 ) is (0, 2)-or (1, 2)-dominating. Then z xy is dominated by both x and y and so S (D,w) (z xy ) = 3, because S (D,w) (y) = 2. Now z xy has at most one in-neighbour distinct from x and y. Since B(xz xy ) and B(yz xy ) only intersect in z xy , this out-neighbour is only is one of those two buds. Therefore either xz xy is (0, 3)-or (1, 3)-dominating, a contradiction to (ii) or yz xy is (2, 3)-dominating, a contradiction to (i).

(iv) Assume for a contradiction that there is a (1, 2, 3)-triangle abc in B 2 . There are exactly three arcs from V (B 6 ) \ {a, b, c} to {a, b, c}. But by (iii), (resp. (ii), (i)) the edge ab, (resp. ac, bc) is not dominating, and so there is an arc from V (B(ab) \ {a, b} to {a, b} (resp. from V (B(ac) \ {a, c} to {a, c}, from V (B(bc) \ {b, c} to {b, c}). Thus there is exactly one arc from V (B(ab) \ {a, b} to {a, b}, one arc from V (B(ac) \ {a, c} to {a, c}, and one arc from V (B(bc) \ {b, c} to {b, c}. Consequently, z bc dominates at most one vertex in {b, c}. Now S (D,w) (z bc ) ∈ {0, 1}, so d -(z bc ) ≤ 1. Hence d -(z bc ) ≤ 1, and so z bc is dominated by at most one vertex in {b, c}. Therefore, either b is the unique in-neighbour of z bc and z bc → c, or c is the unique in-neighbour of z bc and z bc → c. In both case bz bc is a (1, 2)-dominating edge, a contradiction to (iii).

Let us now consider the triangle B 1 = abc. Without loss of generality, we may assume S (D,w) (a) < S (D,w) (b) < S (D,w) (c). By Claim 6.4 (iv), it is not a (1, 2, 3)-triangle. Henceforth, abc is either a (0, 1, 3)-or a (0, 2, 3)-triangle. In particular, a dominates b and c.

If B 1 is a (0, 1, 3)-triangle, then b dominates z bc which must have in-weight 2. So bz bc c is a (1, 2, 3)-triangle, a contradiction to Claim 6.4 (iv).

Henceforth B 1 is a (0, 2, 3)-triangle. By Claim 6.4 (iv), there is no (1, 2, 3)-triangle, hence z bc must have in-weight 0. In particular z bc dominates b. But then ab is a (0, 2)-dominating edge, a contradiction to (iii).

The bound 3 of Theorem 5.7 is best possible as shown by the following proposition. Proposition 6.5. There exist cacti with semi-proper orientation number 3.

Proof. Consider the cactus C obtained from a triangle T = x 1 x 2 x 3 by adding three triangles

T i = x i y i z i , i ∈ [3], intersecting T in x i . See Figure 2.
Let (D, w) be a semi-proper orientation of C. We shall prove that there is a vertex of C with in-weight at least 3. If D T is a directed cycle, then all vertices of T have in-degree and so in-weight at least 1. Since T is a clique, the vertices of T have different in-weights. Thus at least one of them has in-weight at least 3. If D T is a transitive tournament, then one vertex of T , say x 1 has in-degree at least 2 in D. If x 1 has in-weight at least 3, then we are done, so we may assume that S (D,w) (x 1 ) = 2. Necessarily, x 1 dominates y 1 and z 1 . Hence those two vertices have in-weight at least 1. Moreover since T 1 is a clique, x 1 , y 1 and z 1 have different in-weights. Thus one of y 1 , z 1 has in-weight at least 3.

Therefore -→ χ s (C) ≥ 3, and so -→ χ s (C) = 3 by Theorem 5.7.

The lower bound of Theorem 1.

7 is tight. Indeed if G is a k-regular bipartite graph, then δ * (G) = k and -→ χ s (G) ≤ k+1 x 1 x 2 x 3 y 1 z 1 y 2 z 2 z 3 y 3
k-tree H k such that -→ χ s (H k ) = 2k.
Proof. Let G be a graph. We denote by G #k the supergraph of G obtained as follows. For each clique C of size k in G, we create a set

Z C of 2k 2 + 1 new vertices which is complete to C. Observe that if G is a k-tree then G #k is also a k-tree.
Let H 0 be the complete graph on k + 1 vertices. For i = 1 to k + 1, let

H i = H #k i-1 . We shall prove that -→ χ s (H k+1 ) = 2k.
Let (D, w) be an optimal semi-proper orientation of H k+1 . By Theorem 1.7, -→ χ s (H k+1 ) ≤ 2k, so for every vertex v ∈ V (H k+1 ), we have d - D (v) ≤ S (D,w) (v) ≤ 2k. We say that a vertex v is big if S (D,w) (v) ≥ k. We shall prove the following by induction on i, 0 ≤ i ≤ k + 1.

( ) There is a (k + 1)-clique C i ⊆ V (H i ) with at least i big vertices.

For i = 0, ( ) holds trivially. Assume now that i > 0. By the induction hypothesis, there is a (k + 1)clique C i-1 ⊆ V (H i ) with at least i -1 big vertices. If C i-1 has at least i big vertices, then ( ) holds for i with C i = C i-1 . Assume now that C i-1 has exactly i -1 big vertices. Let y be a vertex of C i-1 which is not big and let B i = C i-1 \ {y}. By construction, there is a set Z Bi in H i which is complete to B i . Moreover the vertices of B i have in-degree at most 2k and |Z Bi | ≥ 2k 2 + 1, so there is a vertex z i in Z Bi which is dominated in D by all vertices of B i . Hence S (D,w) (z i ) ≥ k. Now C i = B i ∪ {z i } shows that ( ) holds for i. This completes the proof of ( ). Now ( ) for k + 1 states there is a (k + 1)-clique C with at least k + 1 big vertices. All vertices of C must have different values of S (D,w) , all at least k. Hence there is a vertex v such that S (D,w) (v) ≥ 2k.

Remark 6.7. Since 2k = -→ χ s (H k ) ≤ Mad(H k ) 2 + χ(H k ) -1 ≤ 2δ * (H k ) = 2k
, the graph H k also shows that the upper bound of Theorem 1.5 is tight.

7 Hardness results

Proof of Theorem 1.8

In this subsection, we prove Theorem 1.8 which states that it is NP-complete to determine whether a given planar graph G with -→ χ s (G) = 2 also satisfies χ(G) = 2.

Our proof is a polynomial-time reduction from Planar 3-SAT that we now define. Let Φ be a 3-SAT formula with the set of clauses C = {C 1 , . . . , C k } and the set of variables X = {x 1 , . . . , x n }. Let G Φ be the graph with vertex set C ∪ X ∪ X, where X is the set of negated literals {x 1 , . . . , xn }, in which each clause C j = ( 1 ∨ 2 ∨ 3 ) is adjacent to the vertices 1 , 2 and 3 and x i ∈ X is adjacent to xi for all 1 ≤ i ≤ n. The formula Φ is planar if the graph G Φ is a planar graph.

Problem: Planar 3-SAT. Input: A planar 3-SAT formula Φ. Question: Is there a truth assignment for Φ that satisfies all the clauses? Planar 3-SAT has been proved NP-complete [START_REF] Du | Introduction to Computational Complexity[END_REF].

Let Φ be a planar 3-SAT formula with set of variables X = {x 1 , . . . , x n } and set of clauses C = {C 1 , . . . , C m }. Let us transform this formula into a planar graph H Φ such that -→ χ s (H Φ ) = 2. The graph H Φ is constructed as follows.

• For each 1 ≤ i ≤ n, we create a variable gadget V G i as shown in Figure 3.

• For each 1 ≤ j ≤ m, we create a clause gadget CG j as shown in Figure 3.

• For each clause C j = ( 1 ∨ 2 ∨ 3 ), we connect the vertex c j 1 to 1 , the vertex c j 2 to 2 , and the vertex c j 3 to 3 . Note that here i refers to one of xi and x i , as appropriate. One can observe that it is possible to construct H Φ from G Φ by applying edge subdivisions and adding planar subgraphs pending at some edges. Hence H Φ is also planar. Moreover -→ χ s (H Φ ) ≥ 2. Indeed since its contains 3-cycle (one in each variable gadget), -→ χ s (H Φ ) ≥ χ(H φ ) -1 ≥ 2. On the other hand, one can easily check that the weighted orientation defined as follows is semi-proper and has maximum in-weight 2.

x i xi p i 1 p i 2 p i 3 p i 4 p i 5 V G i c j 1 c j 2 c j 3 q j 1 q j 2 q j 3 q j 4 q j 5 q j 6 q j 7 CG j
• For every 1 ≤ i ≤ n, orient the variable gadget V G i and assign weights to the arcs as shown in Figure 4;

• For every 1 ≤ j ≤ m, orient the clause gadget CG j as in Figure 4 and assign weight 1 to each of its arcs;

• Orient each edge between a variable gadget and a clause gadget from the vertex in the variable gadget to the vertex in the clause gadget and assign this arc a weight of 1.

Let us now prove that χ(H Φ ) = 2 if and only if Φ is satisfiable. Assume first that there is an assignment Γ : X → {true, false} satisfying Φ. Let us construct a proper orientation of H Φ with maximum in-degree 2.

• If e is an edge that connects a vertex of a clause gadget to a vertex of a variable gadget, then orient e from the vertex of the variable gadget to the vertex of the clause gadget.

• For every 1 ≤ i ≤ n, orient the variable gadget V G i as in Figure 5 (a) if Γ(x i ) = true, and as in Figure 5 (b) if Γ(x i ) = false. Observe that a literal (x i or xi ) has in-degree 1 in this orientation if its true, and in-degree 2 if it is false.

x i xi p i 1 p i 2 p i 3 p i 4 p i 5 1 1 1 1 1 2 2 c j 1 c j 2 c j 3 q j 1 q j 2 q j 3 q j 4 q j 5 q j 6 q j 7 1 1 1 1 1 1 1 1 1
Figure 4: Orientations and arc-weightings of the variable and clause gadgets.

x i xi p i 1 p i 2 p i 3 p i 4 p i 5 (a) x i xi p i 1 p i 2 p i 3 p i 4 p i 5 (b)
Figure 5: Orientations of the variable gadget V G i when Γ(x i ) = true (a) and when Γ(x i ) = false (b).

• For every clause C j = ( 1 ∨ 1 ∨ 3 ), we want to orient CG j so that, for all k ∈ [3], the vertex c j k has in-degree 1 (resp. 2) if k has in-degree 2 (resp. 1) in its variable gadget (and thus in the orientation we are building). Since Γ satisfies Φ, at least one of the literals of C j is assigned true and so has in-degree 1 in its variable gadget. Therefore we want at least one of the c j k to have in-degree 2. Now for any possible triple of desired in-degrees, we orient CG j has shown in Figure 6.

It is simple matter to check that the resulting orientation is proper and has maximum in-degree 2. Hence χ(H Φ ) = 2.

Assume now that χ(H Φ ) = 2. Let D be a proper orientation of H Φ with maximum in-degree 2. For each

1 ≤ i ≤ n, D {p i 2 , x i , xi } forms a cycle of length 3. So {d - D (p i 2 ), d - D (x i ), d - D (x i )} = {0, 1, 2}. Therefore d - D (p i 2 ) + d - D (x i ) + d - D (x i ) = 3 = |A(D {p i 2 , x i , xi } )|. Hence D has no arc with tail in V (D) \ {p i 2 , x i , xi } and head in {p i 2 , x i , xi }.
In particular, the following holds:

Claim 7.1. All the arcs between variable gadgets and clause gadgets are oriented from the variable gadget towards the clause gadget.

Claim 7.2. For every The gadget Q is depicted in Figure 9, the gadget L is depicted in Figure 10, and the clause gadget S j is depicted in Figure 11. q 1 q 2 q 3 q 4 q 5 q 6 q 7 have in-degree 2 and the third one has in-degree 1. We do it as shown in Figure 13. It is simple matter that the resulting orientation is a proper orientation of F Φ with maximum in-degree 2. This completes the proof of Part (1). The proof of Part ( 2) is exactly the same as the one of Part [START_REF] Ahadi | The complexity of the proper orientation number[END_REF]. Indeed, when we wanted to have a semi-proper orientation with maximum in-weight 2, we in fact gave a proper orientation with maximum in-degree 2.

1 ≤ i ≤ n, {d - D (x i ), d - D ( xi )} = {1, 2}. Proof. Recall that {d - D (p i 2 ), d - D (x i ), d - D (x i )} = {0,
(p i 3 ) = 2. Consequently, {d - D (p i 1 ), d - D (p i 3 )} = {1, 2}. Thus, d - D (p i 2 ) = 0. Hence {d - D (x i ), d - D (x i )} = {1, 2}. f 6 z f 1 f 2 f 3 f 4 f 5 F 1 z 1 z 2 z 3 F 2
This completes the proof of Theorem 1.9.

Conclusions and future research

In this work, we introduced semi-proper orientations and the semi-proper orientation number of a graph, and established some properties of those. In particular, we gave positive answers to the analogues of Problem 1.2 and Problem 1.3. However, these two original problems are still open. An affirmative answer to them would follow from the following conjecture, which is interesting in its own. Conjecture 8.1. There is a function f such that χ(G) ≤ f ( -→ χ s (G)) for any graph G?

Since the graphs with semi-proper orientation number 1 are the ones with proper orientation 1, that are the union of stars we have f (1) = 1. Araujo et al. [START_REF] Araújo | On the proper orientation number of bipartite graphs[END_REF] showed trees with proper orientation number 4, so f (2) ≥ 4. Araujo et al. [START_REF] Araujo | Proper orientation of cacti[END_REF] showed a cactus with proper orientation number 7, so f (3) ≥ 7. Theorem 1.9 states that determining the semi-proper orientation number of planar bipartite graphs is NP-hard. On the other hand, deciding whether the proper orientation number of a given 4-regular graph is 3 is NP-complete [START_REF] Ahadi | The complexity of the proper orientation number[END_REF]. What can we say about the complexity of computing the semi-proper orientation number of regular graphs? Problem 8.2. What is the computational complexity of computing the semi-proper orientation number of regular graphs?

We proved that the semi-proper orientation number can be 4-approximated. A natural question is whether it could be better approximated and how better? Problem 8.3. Does there exists α < 4 such that there exists a polynomial-time algorithm yielding an α-approximation of the semi-proper orientation number? Problem 8.4. Does there exists a polynomial-time approximation scheme for the semi-proper orientation number?

Finally, another interesting question for future work is the problem of finding an optimal weighting for a given directed graph. Is there a polynomial time algorithm to solve it?

  An arc-weighting of a digraph D is an application w : A(D) → N. A weighted digraph is a pair (D, w), where D is a digraph and w an arc-weighting of D. Let (D, w) be a weighted digraph (D, w). The inweight of a vertex v in (D, w), denoted by S (D,w) (v), is the sum of the weights of arcs with head v in D: S (D,w) (v) = u∈N -(v) w(uv). The maximum in-weight of (D, w) is Σ(D, w) = max v∈V (D) S (D,w) (v). A weighted digraph is semi-proper if two adjacent vertices have different in-weights. The semi-proper number of a digraph D, denoted by µ(D), is the minimum maximum in-weight over all semi-proper weighted digraphs on D: µ(D) = min{Σ(D, w) | (D, w) is a semi-proper orientation}.

For a graph

  G, we denote by m -(G) the minimum of the maximum in-degree over its orientations. In symbols, m -(G) = min{∆ -(D) | D is an orientation of G}.Theorem 5.1 immediately implies the following.Corollary 5.2. m -(G) ≤ -→ χ s (G) ≤ m -(G) + χ(G) -1 for all graph G. Proposition 5.3. m -(G) = 1 2 Mad(G) for all graph G.Proof. Let G be a graph. Let H be a subgraph of G such that Ad(H) = Mad(G). Then H has 1 2 Ad(H)|V (H)| edges. Hence every orientation of H has a vertex with in-degree at least1 2 Ad(H) = 1 2 Mad(G) . Since every orientation of G contains an orientation of H, we have m -(G) ≥1 2 Mad(G) . Consider now an orientation D of G such that ∆ -(D) = m -(G) and such that the number of vertices with in-degree m -(G) is minimum. Let Z (resp. Y , X) be the set of vertices with in-degree m

3 .

 3 For 1 ≤ k ≤ n, we construct inductively an arc-weighting w k of semi-proper orientation of D k = D {v 1 , . . . , v k } with maximum in-weight 2δ * (G).

Claim 6 . 2 .Proposition 6 . 3 .

 6263 Let (a, b) be an edge in T i . If m(ab) ≤ 3, then T i+8 has an edge a b such that m(a b ) > m(ab). Proof. Assume that m(ab) ≤ 3. Without loss of generality, we may assume that m(ab) = S (D,w) (a) < S (D,w) (b). Set j = i + 8. The common neighbourhood of a and b in T j is the union of two disjoint paths P and Q of order j -i = 8. There are at most S (D,w) (a) + S (D,w) (b) -1 ≤ 7 vertices which are not dominated by both a and b. Hence, one of the two paths, say P , contains at most three vertices which are not dominated by both a and b. Since P has order 8, there are at least two consecutive vertices on P , say c and d, which are both dominated by a and b. Both c and d have in-weight at least 2. Without loss of generality, S (D,w) (c) < S (D,w) (d), so S (D,w) (d) ≥ 3 ≥ S (D,w) (a). Since a and d are adjacent, S (D,w) (d) > S (D,w) (a). Hence the edge db satisfies m(db) > S (D,w) (a) = m(ab). Now T 0 has an edge with minimum weight at least 1, so by Claim 6.2, T 8 has an edge with minimum weight at least 2, T 16 has an edge with minimum weight at least 3, and T 24 has an edge ab with minimum weight 4. Without loss of generality, we have S (D,w) (a) = 4 and S (D,w) (b) = 5. The common neighbourhood of a and b in T 44 is the union of two disjoint paths P and Q of order 20. There are at most S (D,w) (a) + S (D,w) (b) -1 ≤ 8 vertices which are not dominated by both a and b. Hence, one of the two paths, say P , contains at most four vertices which are not dominated by both a and b. Since P has order 20, there are four consecutive vertices v 1 , v 2 , v 3 , v 4 of P that are all dominated by both a and b. Those four vertices must have in-weight in {2, 3}. Without loss of generality, S (D,w) (v 1 ) = S (D,w) (v 3 ) = 3 and S (D,w) (v 2 ) = S (D,w) (v 4 ) = 2. Vertex v 2 is dominated by a and b and has in-weight 2, so v 2 → v 3 . Now v 3 is dominated by a, b and v 2 and has in-weight 3 so so v 3 → v 4 . Therefore v 4 has in-degree at least 3, but has in-weight at most 2, a contradiction. The bound 4 of Corollary 1.6 (ii) is best possible, as shown by the following proposition. There exist outerplanar graphs with semi-proper orientation number 4. Proof. Let G be a 2-connected outerplanar graph with outer cycle C = x 1 . . . x n x 1 . The budding of G, denoted by B(G), is the outerplanar graph obtained from G by adding for every edge e = uv of C a new vertex z e (in the outer face) connected to both u and v. The outer cycle of B(G) is then x 1 z x1x2 x 2 z x2x3 . . . x n z xnx1 x 1 .

Figure 1 :

 1 Figure 1: B 6 , an outerplanar graph with semi-proper orientation number 4.

  xyz is a set of vertices {x, y, z} such that G {x, y, z} is a complete subgraph and S (D,w) (x) = k 1 , S (D,w) (y) = k 2 , and S (D,w) (z) = k 3 . Claim 6.4. (i) There is no (2, 3)-dominating edge in B 5 .

Figure 2 :Proposition 6 . 6 .

 266 Figure 2: Cactus C with semi-proper orientation number 3.

Figure 3 :

 3 Figure 3: The variable gadget V G i and the clause gadget CG j .

Figure 7 :

 7 Figure 7: The gadgets F 1 and F 2 .

Figure 8 :

 8 Figure 8: The variable gadget H i .

Figure 9 :

 9 Figure 9: The gadget Q.

7 Figure 10 : 3 Figure 11 :

 710311 Figure 10: The gadget L.

Figure 12 :

 12 Figure 12: Orientation of the variable gadget H i .

by Theorem 1.5. The upper bound of Theorem 1.7 is tight as shown by the following proposition.

Acknowledgements

The authors would like to thank the anonynous referees for their reports which help to improve the presentation of the paper.

F. Havet is supported by Agence Nationale de la Recherche (France) under research grant ANR DI-GRAPHS ANR-19-CE48-0013-01.

Proof. To the contrary suppose that d - D (c j 1 ) = d - D (c j 2 ) = d - D (c j 3 ) = 1. By Claim 7.1, this implies that the arcs c j 1 q j 1 , c j 2 q j 4 and c j 3 q j 7 must be in D. Thus, since D is proper with ∆ -(D) = 2, we have

In turn, this implies that {d - D (q j 2 ), d - D (q j 3 )} = {0, 1} and {d - D (q j 5 ), d - D (q j 6 )} = {0, 1}. Thus q j 3 q j 4 and q j 5 q j 4 are arcs of D. But this implies that q j 4 has in-degree 3, a contradiction.

Let Γ : X → {true, false} be the assignment defined by Γ(

Hence by our definition of Γ at least one literal of C j is assigned true, i.e., Γ satisfies Φ. This completes the proof of Theorem 1.8.

Proof of Theorem 1.9

In this subsection, we prove Theorem 1.9.

Let us first prove Part (1) of this theorem which states that it is NP-complete to determine whether a given planar bipartite graph G satisfies -→ χ s (G) ≤ 2. Our prove is a reduction from the problem defined as follows. Let Φ be a 3-SAT formula with clause set C and variable set X. A 1-in-3 assignment for Φ is a truth assignment such that each clause of Φ has exactly one true literal. Problem: Cubic Planar 1-in-3 SAT. Instance: A planar 3-SAT formula Φ such that every variable appears in exactly three clauses, and there is no negated literals in the clauses. Question: Is there a 1-in-3 assignment for Φ ?

Moore and Robson proved [START_REF] Moore | Hard tiling problems with simple tiles[END_REF] that Cubic planar 1-in-3 SAT is NP-complete.

Let Φ be a planar 3-SAT formula such that every variable appears in exactly three clauses, and there is no negated literals in the clauses. We shall transform this into a planar bipartite graph F Φ such that χ(F Φ ) = 2 if and only if Φ has a 1-in-3 assignment.

Let us first describe some gadgets and their properties. The gadgets F 1 and F 2 are depicted in Figure 7. The variable gadget H i is depicted in Figure 8. Lemma 7.4. Let G be graph such that -→ χ s (G) ≤ 2 and let (D, w) be one of its optimal semi-proper orientations.

Lemma 7.5. Let G be graph such that -→ χ s (G) ≤ 2 and let (D, w) be one of its optimal semi-proper orientations.

(i) If G contains the gadget Q as an induced subgraph and there are vertices x, y not in V (Q) such that x → c 1 and y → c 2 in D, then 2 ∈ {S (D,w) (c 1 ), S (D,w) (c 2 )}.

(ii) If G contains the gadget L as an induced subgraph, then {S (D,w) (c 1 ), S (D,w) (c 2 ), S (D,w) (c 3 )} = {2, 2, 2}.

(iii) If G contains the variable gadget S j as an induced subgraph, then two vertices in {c j 1 , c j 2 , c j 3 } have in-weight 2 and the third one has in-weight 1.

Proof. (i) By Lemma 7.4-(ii), we have S (D,w) (z 2 ) = 0, so z 2 z 1 ∈ A(D). But by Lemma 7.4-(i), S (D,w) (z 1 ) ∈ {0, 1}, thus S (D,w) (z 1 ) = 1 and z 2 z 1 is the unique arc entering z 1 . In particular z 1 → q 4 . Assume for a contradiction that 2 / ∈ {S (D,w) (c 1 ), S (D,w) (c 2 )}. Then S (D,w) (c 1 ) = 1 and xc 1 is the only arc entering c 1 and S (D,w) (c 2 ) = 1 and yc 2 is the only arcs entering c 2 . Hence c 1 → q 1 and c 2 → q 7 . Thus, since D is semi-proper with maximum in-weight 2, we have S (D,w) (q 1 ) = S (D,w) (q 4 ) = S (D,w) (q 7 ) = 2. In turn, this implies that {S (D,w) (q 2 ), S (D,w) (q 3 )} = {0, 1} and {S (D,w) (q 5 ), S (D,w) (q 6 )} = {0, 1}. Thus q 3 → q 4 and q 5 → q 4 . But this implies that q 4 has in-degree 3 and so in-weight at least 3, a contradiction.

(ii) To the contrary assume that S (D,w) (c k ) = 2 for all k ∈ [START_REF] Ahadi | Is there any polynomial upper bound for the universal labeling of graphs?[END_REF]. The semi-proper orientation number of G is 2, so at least one of the three edges p 7 p 4 , p 7 p 5 , p 7 p 6 is oriented away from p 7 . By the symmetry, we may assume that p 7 → p 4 . On the other hand, by Lemma 7.4-(i), we have S (D,w) (p 4 ) ∈ {0, 1}. Thus, S (D,w) (p 4 ) = 1 and p 7 p 4 is the unique arc entering p 4 . Thus

(iii) follows directly from (i) and (ii).

Let F Φ be the graph constructed as follows.

• We first take the disjoint union of the variable gadgets H i , 1 ≤ i ≤ n, and the clause gadgets S j ,1 ≤ j ≤ m.

• For every clause C j = 1 ∨ 2 ∨ 3 , add the edges 1 c j 1 , 2 c j 2 and 3 c j 3 .

The graph G Φ is planar, so the graph F Φ is also planar. Moreover since Φ has no negated literals, one can easily check that F Φ is bipartite.

Let us show that -→ χ s (F Φ ) = 2 if and only if there is a 1-in-3 satisfying assignment for Φ.

Assume first that -→ χ s (F Φ ) = 2. Let (D, w) be an optimal semi-proper orientation of G. Let Γ : X → {true, false} be the assignment defined by Γ(x i ) = true if S (D,w) (x i ) = 2, and Γ(x i ) = false if S (D,w) (x i ) = 1. For each clause C j = ( 1 ∨ 2 ∨ 3 ), by , two vertices of {c j 1 , c j 2 , c j 3 } have in-weight 2 and the third one has in-weight 1. Moreover, by , the vertices of 1 , 2 , 3 have in-weight 1 or 2. Thus, because (D, w) is semi-proper, two vertices of { 1 , 2 , 3 } have in-weight 1 and the third one has in-weight 2. Hence, Γ is a 1-in-3 satisfying assignment for Φ.

Assume now that Φ has a 1-in-3 assignment Γ : X → {true, false}. We shall construct a proper orientation D of F Φ with maximum in-degree 2. With the arc-weighting w that assigns weight 1 to all the arcs, this is a semi-proper orientation with maximum in-weight 2. For every 1 ≤ i ≤ n, orient the edges of E(H i ) \ {x i xi } as shown in Figure 12, and orient x i xi from xi to x i if Γ(x i ) = true and from x i to xi if Γ(x i ) = false. Orient all the edges linking a vertex of a clause gadget to a vertex of a variable gadget from the vertex of the variable gadget to the vertex of the clause gadget. Doing so, for every 1

Finally we orient the clause gadgets. Consider a clause C j = 1 ∨ 2 ∨ 3 . Since Γ is a 1-in-3 assignment for Φ, exactly one literal among 1 , 2 , 3 is assigned true. Hence one vertex in 1 , 2 , 3 has in-degree 2 and the two others have in-degree 1. We shall orient the clause gadget S j such that each c j k , k ∈ [START_REF] Ahadi | Is there any polynomial upper bound for the universal labeling of graphs?[END_REF], has in-degree 1 if Γ( k ) = true and has in-degree 2 if Γ( k ) = false. Hence we need to orient S j such that two of the c j k 1 2 2

Figure 13: Orientation of the clause gadget S j . White vertices correspond to c j 1 , c j 2 , c j 3 . The number written in such a vertex corresponds to the desired in-degree.


Dr Giuseppe Bengasi

Dr Rita Meunier-Prest

Kamal Baba

Dr Abhishek Kumar

Dr Anna Lucia Pellegrino

Dr Nicolas D Boscher
email: nicolas.boscher@list.lu

Marcel Bouvet
email: marcel.bouvet@u-bourgogne.fr

Dr Kamal Baba

Prof Marcel Bouvet

Molecular Engineering of Porphyrin-Tapes/Phthalocyanine Heterojunctions for a Highly Sensitive Ammonia Sensor

Keywords: Porphyrins, Phthalocyanines, Heterojunctions, Sensors, Ammonia

Modulating the interfacial charge alignments by molecular engineering in an organic heterojunction device is a smart strategy to improve its conductivity, which can be exploited in high performance gas sensors development. Herein, the fabrication of new organic heterojunction devices based on porphyrin tapes and phthalocyanines and their potentiality in ammonia sensing at different relative humidity (rh) are investigated. The devices are built using dry approach relying on oxidative chemical vapor deposition for simultaneous synthesis, doping and deposition of the porphyrin tape layer and physical vapor deposition of phthalocyanine layer. The association of the porphyrin tapes with copper phthalocyanine (CuPc) or its perfluorinated analogue (Cu(F16Pc)) in a bilayer device configuration revealed a non-linear current-voltage characteristics, assigned to the formation of organic heterojunction at the bilayer interface. Cu(F16Pc)-based devices revealed higher response, faster sorption kinetics, stable baseline and less interference from rh fluctuations towards ammonia than CuPcbased devices which are attributed to more conducting interface in the former. Moreover, depending on the porphyrin tape associated, Cu(F16Pc)-based devices exhibited sensitivity

1 Giuseppe Bengasi, Rita Meunier-Prest, Kamal Baba, Abhishek Kumar, Anna Lucia Pellegrino, Nicolas D. Boscher,* Marcel Bouvet*

Molecular Engineering of Porphyrin-Tapes/Phthalocyanine Heterojunctions for a Highly Sensitive Ammonia Sensor

The development of a new series of organic heterojunctions for ammonia sensing is achieved with a fully dry approach. The top layer is composed of porphyrin tapes synthetized by oCVD. The bottom layer, obtained by sublimation of different phthalocyanines, affects the detecting behavior. The performances obtained place the devices between the best ammonia sensors reported so far.

Introduction

Metalloporphyrinoids (MPor) are fascinating compounds that have been selected by Nature to fulfill a series of important biochemical functions. [1] The coexistence of a conjugated organic macrocyclic structure and a transition metal center provides MPor with numerous properties that fostered their use in catalysis, [2,3] theranostic [4] and non-linear optic. [5] Another application area of MPor is chemosensing, [6] in which interactions with a chemical analyte modifies the physical properties of MPor film that can be transduced into a measurable signal. Based on the nature of signal transductions, MPor based optical, acoustic, magnetic and electrical chemosensors have been developed [7] to detect myriad of species such as redox gases [8] , volatile organic compounds [9] and inorganic biochemical species [10] . Particularly, MPor chemosensors based on electrical transductions such as chemiresistors, ChemFet and conductometric sensors have drawn interests exploiting the semiconducting nature of MPor, which can be effectively tuned by adding substituents to its macrocyclic periphery or ligands at the metal center. F. Song and coworkers reported a chemiresistor based on highly ordered film of tetra-amino zinc porphyrin derivative to selectively detect NO2 at sub-ppm concentration. [11] Elsewhere, selfassembled monolayers of MPor films in ChemFet configuration were used to detect organic vapors and redox gases, exhibiting the strong influence of metal atom on sensors responses. [12,13] However, most of the MPor are poor conducting materials owing to low πconjugation, limiting the sensors performances. To overcome this limitation, different approaches have been adopted such as forming a composite with more conducting materials like carbon nanotubes, [14,15] conductive polymers [16,17] or metal oxides. [18,19] An alternative solution to the MPor low conductivity can be the formation of highly conjugated porphyrin polymers to extend the molecular π-system. However, the synthesis of conjugated porphyrin polymers requires significant synthetic efforts. In 2001, Osuka and co-workers provided a new route towards the easy synthesis of directly fused metalloporphyrins, known as porphyrin tapes (Scheme 1). [20] Porphyrin tapes possess a series of outstanding properties such as electronic transitions in IR region, [20] increased catalytic activity, [21] two-photon absorption [22] and low conductance attenuation factors. [23,24] The synthesis of porphyrin tapes relies on the oxidative coupling and can be carried out adopting chemical [20] or electrochemical methods. [25,26] However, in case of electrochemical methods, formation of thin films requires the use of conductive substrates, limiting its application in the production of optoelectronic devices. Furthermore, porphyrin tape planar structure favors aggregation and results in poor solubility and unmeltability, thus produces non-uniform thin films, restricting its integration in electronic devices. To achieve sufficient solubility, the use of long and/or bulky substituents able to counterbalance the interaction between the different polymeric chains was proposed. [27,28] However, the presence of substituents on the porphyrin negatively affects its electrical properties inhibiting interaction between the polymeric chains. [29] Very recently, we implemented the oxidative chemical vapor deposition (oCVD) approach for the synthesis of porphyrin tapes. [30] The oCVD approach relies on the simultaneous sublimation of MPor bearing free meso and βpositions and an oxidizing agent (e.g. FeCl3) to perform oxidative coupling polymerization directly from the gas phase. Operating from the gas phase also allows circumventing the insolubility and non-meltability of porphyrin tapes, thus yielding p-doped porphyrin tapes homogeneous thin films in a single step independent of the substrate. [30] The oCVD technique was also implemented with different central metal cations, [31] substituents [29,32] and oxidants [33] showing the versatility of this approach for the synthesis of fused porphyrin tapes. Interestingly, we observed that during oCVD, reaction of MPor substituted with aryl groups possessing free ortho-positions causes intramolecular dehydrogenative coupling between these ortho-positions and nearby βpositions of the porphyrin macrocycle. [29,30,32] As a result of this reaction, the molecule is flattened favoring interaction between the different polymeric chains and therefore increasing the conductivity of the film. [29] The increased conductivity of phenyl-fused porphyrin tape can be utilized in conductometric gas sensors, which remain an unexplored application area for this material. Some of us developed an original conductometric gas sensing device based on an organic heterojunction between a poor conducting and a high conducting organic semiconductors, which has shown high sensitivity and selectivity towards redox gases. [34,[START_REF] Bouvet | Semiconductor Tranducer and Its Use in a Sensor for Detecting Electron-Donor or Electron-Acceptor Species[END_REF] These sensing devices benefit from the organic heterojunction effects in which opposite charges (e -and h + ) are accumulated at the interface of a bilayer film because of the workfunction difference between the semiconducting layers, enhancing the charge carriers mobility along the interface. [36] In majority of these devices fabricated so far, a poor conducting metal phthalocyanine (MPc) as a sublayer and a high conducting MPc as a top layer were used. A combination of perfluorinated copper phthalocyanine (Cu(F16Pc)) and lutetium bisphthalocyanine (LuPc2) in a bilayer heterojunction configuration exhibited among the best NH3 sensing performances (detection limit of 140 ppb) as revealed in our recent studies. [37] Octachloro derivatives of different MPc (M: Co, Cu and Zn) were also used as sublayer and showed n-type, p-type or ambipolar sensing device characteristics depending on the metal atom in MPc under exposure to NH3 in a wide range of relative humidity (rh). [38] Other than MPc, a few other organic semiconductors such as polyaniline, poly(2,5-dimethoxyaniline), [39,40] carboxylate and fluoro derivatives of perylene [41] as well as inorganic semiconductors like tungsten oxide (WO3) [42] were also used as sublayer in combination with LuPc2 as top layer to detect NH3 in the sub-ppm range. Notably, in all these heterojunction sensing devices, top layer remained the same (because majority of MPc have low carrier density) LuPc2 being among a few highly conducting phthalocyanine materials because of its radical nature. [START_REF] Bouvet | Radical Phthalocyanines and Intrinsic Semiconduction in The Porphyrin Handbook[END_REF] Porphyrin tapes represent a suitable alternative to LuPc2 in organic heterojunction gas sensors because their extended π-conjugation imparts high charge carrier concentration. Moreover, its carrier density can be effectively tuned by changing the conjugation length of the carbon chain or by controlling the spatial orientation of the subunits. [29] Accordingly, herein we report the fabrication of organic heterojunction gas sensors incorporating MPc or its perfluorinated analogue as a sublayer and porphyrin tapes as a top layer in a bilayer heterostructure configuration (Scheme 2) and investigate their potentialities in NH3 detection in a wide rh range at room temperature. Two different porphyrin tapes, owing different molecular geometry and structure, are investigated as a top layer after their oCVD in situ synthesis on a MPc coated substrate (Scheme 1). The microstructure, morphologies, electronic properties and chemical purity of the porphyrin tapes are extensively characterized by XRD, SEM, XPS, mass spectrometry and UV/Vis/NIR spectroscopy. The electrical properties of the devices are studied by recording current-voltage characteristics and the electrical nature of heterojunction interface is evaluated. The ammonia sensing properties of different heterojunction devices are investigated by a fixed duration of exposure and recovery cycles in a dynamic NH3 concentration and rh. Different sensors analytical parameters, such as sensitivity, repeatability, linear range, limit of detection are finally evaluated.

Results and Discussion

Fabrication of the Chemosensing Devices

The organic heterojunction devices were fabricated by sequential deposition of 50 nm CuPc or its perfluorinated anologue (Cu(F16Pc)) by high vacuum sublimation on a glass substrate lithographically patterned with ITO interdigitated electrodes and 40 nm of porphyrin tapes by oCVD (Scheme S1). Two different types of porphyrin tapes, namely pNiDPP and pNiDMP originating from Ni(II) 5,15 (diphenyl) porphyrin (NiDPP) and Ni(II) 5,15 (dimesityl) porphyrin (NiDMP) monomers, respectively, were investigated as top layer in the heterojunction devices. As illustrated in Scheme 1, S2 and S3, the free ortho-position in the aryl subunit of NiDPP allows an intramolecular cyclization concurrently with the formation of directly fused porphyrin tapes during oCVD. The cyclization causes a flattening of pNiDPP macrocyclic subunit, resulting in an expanded system and improved intermolecular  interactions and conductivity. [29] Kojima and co-workers showed that cyclization reaction also lowers the position of LUMO and increases Lewis acidity of the metal center. [START_REF] Saegusa | [END_REF] Thus, pNiDPP exhibits augmented Lewis acidity and an expanded system that should facilitate the interaction with reducing gases such as NH3. On the contrary, NiDMP, because of blocked ortho-position of the aryl moities, is not subjected to intramolecular cyclization, hindering strong intermolecular  interactions and thus results in less enhancement in conductivity. [29] Details of the oCVD reactor and oCVD reaction conditions are given in Scheme S1 and Table S1. Thus, four heterojunction devices were realized; namely CuPc/pNiDPP, CuPc/NiDMP, Cu(F16Pc)/pNiDPP and Cu(F16Pc)/pNiDMP. During the oCVD step, glass and silicon substrates were also coated to enable microstructural and elemental characterisation of pNiDPP and pNiDMP thin films.

Composition, Structure and Morpholgies of the Porphyrin Tapes Thin Films

pNiDPP and pNiDMP fused porphyrin films exhibit a drastic color change, from orange to green/grey, when compared to sNiDPP and sNiDMP reference films prepared from the sole sublimation of the monomers (Figure 1). This color change and NIR absorption observed for the porphyrin tapes films (Figure 1), arise from extension of the π-system and are typical to formation of porphyrin tapes. [30] Indeed, the extended system in the fused porphyrin raises the energy level of the HOMO facilitating electronic transition and consequently absorption in the NIR region. [20] Due to the cyclization reactions, the spectrum of pNiDPP shows an intense broadening while pNiDMP, in which no cyclization takes place, exhibits well defined absorption bands associated with the formation of doubly and triply linked porphyrin tapes. [29] The occurrence of the oxidative polymerization reaction during oCVD is confirmed by LDI-HRMS analysis on the porphyrin tapes film (Figure S1), showing the peaks corresponding to the formation of fused porphyrin oligomers. The mass spectra also exhibit a family of peaks distribution related to the exchange of hydrogen atoms with chlorine, which is attributed to the presence of Cl2 produced during the sublimation of FeCl3. [33] The spectrum also confirms occurrence of the cyclization reaction in pNiDPP showing loss of more than 6H atoms in the dimeric region (Figure 1c). Particularly, every coupling reaction (i.e. singly/doubly/triply linked units and/or cyclization) causes the loss of hydrogen atom pairs (-2H) (Scheme S2 and S3). While the most intense peaks in pNiDMP dimeric region correspond to the formation of doubly and triply linked porphyrin tapes (NiDMP2 -4H and -6H species in Figure 1c), pNiDPP exhibits signals with high intensity corresponding to more unsaturated species (NiDPP2 -8H, NiDPP2 -10H and NiDPP2 -12H) due to the occurrence of cyclization reaction (Scheme S2 and S3). Species associated to the loss of more than 6H were observed at lower intensity also in pNiDMP mass spectrum (Figure 1d). We recently showed that the formation of additional unsaturated species also takes place for pNiDMP, probably due to surface reactions catalyzed by iron species. [29] Although we didn't identify the exact nature of this species, we observed a marginal abundance of such molecules during the oCVD of pNiDMP. [29] LDI-HRMS also shows, in both samples, that the presence of demetalated porphyrins is negligible, confirming the high stability of Ni(II) cation in the porphyrin tapes.

In addition, the relative atomic compositions, obtained by XPS of pNiDMP and pNiDPP thin films are close to the theoretical ones of their respective monomers (Table S2). The binding energy of Ni 2p peak in all samples is constant at 855.4 eV, confirming the retention of the nickel center during the oxidative coupling of porphyrin during oCVD (Figure S2). Analysis of the valence band XPS spectra of porphyrin tapes and their respective monomers indicates the shifting of valence bands maximum (VBM) towards lower binding energy after polymerization (Figure 2). It implies that HOMO level shifts upward after polymerization, narrowing the band gap of the porphyrin tapes from their respective monomer. Notably, pNiDPP spectrum depicts lower VBM value (1.5 eV) compared to pNiDMP (1.93 eV), which also translates into higher HOMO energy of pNiDPP, which can be attributed to the intramolecular cyclization reaction during oCVD process extending the conjugation length.

Thin films morphologies studied by FE-SEM (Figure 3b and3c) revealed a slightly different morphology for the two porphyrin tapes. In fact, pNiDMP displays a more ruffled and corrugated surface that may be ascribed to steric hindrance associated with mesityl groups causing less regular arrangements of the polymer chains (see below). pNiDPP film exhibits a more porous morphology that could be attributed to the cyclization reaction. Particularly, the cyclization reaction involves the production of gaseous by-products that bubbles out from the film causing the formation of pores. [45] Lower magnification SEM images of the both materials are shown in Figure S3 and S4 depicting a compact surface and the presence of residual oxidant FeCl3 used in the CVD process.

To further understand the organizations in pNiDMP and pNiDPP thin films, in depth structural characterization was made by XRD. The XRD patterns display several peaks, pointing to the formation of an ordered distribution of the porphyrin tapes (Figure 3 a). All the peak values are summarized in Table S3 and for each of them the corresponding plane distance was derived.

Notably, both materials have polycrystalline organization. However, pNiDPP film presents more numerous and intense signals, thus suggesting higher crystalline degree.

The extrapolated distances, ranging between 5.55 Å and 2.31 Å, may be associated with parallel orientations of the conjugated porphyrins tapes. This assumption is in agreement with our DFT study on a model composed of two monomeric units showing an estimated distance between parallel porphyrin units around 3.3 Å. [29] We expect that moving from monomer model into porphyrin tapes would lead to increased interplanar distances due to the steric hindrance. [46] Accordingly, X-ray single crystal structures of the fused dimers and trimers obtained for 3,5di-tert-butylphenyl-substituted and pentafluorophenyl-substituted Zn and Ni porphyrins showed various interplanar distances between 3.75 Å and 9.60 Å for the bigger substituent units. [46] On the contrary, the interplanar distances should be reduced by the cyclization reaction in NiDPP due to planarization of the molecule. Indeed, only pNiDPP film exhibits signals related to interplanar distances smaller than 3 Å. Furthermore, cyclization and the consequent planarization of the molecule could account for the higher crystallinity observed for pNiDPP film compared to pNiDMP. Second order reflections (Table S3) are also likely contributing to the diffraction patterns. In a similar fashion, PEDOT films obtained by oCVD shows 0k0 reflections XRD pattern at 26°, indicating the presence of parallel orientation of the polymeric chains. [47] The parallel orientation of the porphyrin tapes is also corroborated by the FE-SEM (Figure S3 and S4) images of the films showing in both cases flat and smooth surfaces. In order to exclude contributions of residual monomers in the XRD patterns, we also acquired XRD patterns of the monomer powders and films formed by sublimation of the monomer.

Comparison between NiDMP monomer powder and pNiDMP film XRD patterns does not show any overlap of the peaks (Figure S5) allowing to exclude any contribution of the monomer into the XRD pattern of the oCVD film. On the contrary, NiDPP monomer powder and the pNiDPP film's XRD patterns present both the peaks at 15.96°, 20.70° and 22.35°(Figure S6). We also acquired XRD pattern of sublimated NiDPP (sNiDPP) film deposited under the same operative condition as of pNiDPP. The comparison between the XRD patterns of NiDPP powder, sNiDPP and pNiDPP films is reported in Figure S7. The XRD pattern of sNiDPP film shows a unique peak at 5.15°, which is also present in NiDPP powder pattern but not in pNiDPP film one. This observation excludes any contribution of residual monomer to the XRD pattern of pNiDPP.

The peak at 5.15° corresponds to 17.14 Å plane distance. This value can be rationalized hypothesizing a perpendicular packing of the monomeric porphyrins on the substrate. The assumption is further validated by the DFT calculations, showing distance between the two phenyl rings in NiDPP molecule around 17.28 Å [32] which is in agreement with a perpendicular stacking of the porphyrins through the planes. Finally, the contribution of Fe-Cl crystalline phase has been also excluded considering the diffraction files PDF00-001-1106 (FeCl2), and

Electrical Properties of the Heterojunction Devices

Electrical properties of pNiDPP and pNiDMP porphyrin tapes film deposited onto chips patterned with interdigitated electrodes were investigated. The recorded current-voltage (I(V)) characteristics revealed ohmic behavior for both porphyrin tapes films, confirming a resistor like properties. The conductivity values obtained for pNiDPP and pNiDMP are 1×10 -4 S•cm -1 and 1×10 -8 S•cm -1 , respectively. The higher conductivity of pNiDPP film is attributed to the intramolecular cyclization leading to molecular flattening that intensify the  interactions and reduces the intermolecular distances. The current values obtained at a bias voltage of +10 V are 5.5×10 -6 A, 7.5×10 -7 A and 5.5×10 - 9 A for CuPc/pNiDPP, Cu(F16Pc)/pNiDPP and Cu(F16Pc)/pNiDMP devices, respectively, while CuPc/pNiDMP revealed unstable and huge hysteresis in the output current on a reverse voltage sweep. It is evident that heterojunction devices' current changes as a function of top layer and sublayer. Unstable I(V) curve with high hysteresis for CuPc/pNiDMP device is attributed to the relatively larger amount of residual Fe 3+ and Cl -ions in pNiDMP layer also confirmed by its XPS elemental analysis. Nonetheless, heterojunction device having the same porphyrin tape, but with Cu(F16Pc) as sublayer showed a highly symmetrical, stable and less hysteresis in its current, indicating that charges alignment at the bilayer interface plays a crucial role. The interfacial charges distribution is determined by the semiconducting polarity, workfunction and the carrier concentration of each material in the bilayer. [36] For Cu(F16Pc) based devices, because of the very high workfunction of the sublayer and its n-type semiconducting behavior, e -and h + are accumulated at the interface and an accumulation heterojunction is formed (Figure 5a). On the contrary, in CuPc based devices, owing to its p-type behavior and low workfunction, holes are accumulated in the sublayer and depleted in the top layer near the interface, and the heterojunction so developed is of the type hole accumulation/depletion (Figure 5b). It is worth mentioning that in Cu(F16Pc) based heterojunctions, mobile carriers (e -and h + ) are accumulated turning the interface highly conducting. On the other hand, CuPc based heterojunctions have only half of the interface filled with free carrier (h + ) while the other half is occupied by immobile charges. Thus, instability and large hysteresis in the CuPc/pNiDMP device results from large accumulation of residual Cl -ions in the top layer near the interface. Because of the opposite charges alignment at the heterojunction interface, an energy barrier is developed which can be quantified by measuring the x-intercept of the tangent to I(V) curves at high bias voltage.

The apparent energy barrier (Uth) estimated for CuPc/pNiDPP, Cu(F16Pc)/pNiDPP and Cu(F16Pc)/pNiDMP devices are 0.72 V, 1.82 V and 1.91 V, highlighting strong effect of the sublayer on the heterojunction device electrical properties. The Uth of CuPc/pNiDMP could not be calculated because of non-reproducibility of its I(V) curves.

Ammonia Sensing Properties of the Heterojunction Devices

The implication of different interfacial charges alignments in heterojunction devices were investigated on their ammonia sensing properties, performed in a dynamic mode by alternate exposure under 90 ppm NH3 and a recovery under clean air devoid of NH3 for an interval of 10 and 15 minutes, respectively. A current decrease during exposure and an increase under recovery cycle were observed (Figure 6a and6b) for CuPc based heterojunctions, highlighting the p-type semiconducting polarity of the device considering the electron donating nature of ammonia. The relative responses (RR) (calculated by equation 1) for different exposure cycles were -24 % and -48 % and response time (t90%) were 3.9 min and 4.3 min for CuPc/pNiDPP and CuPc/pNiDMP heterojunctions, respectively, indicating the influence of top porphyrin tapes film on the sensors response. Moreover, a significant drift in CuPc/pNiDPP device baseline current is also noticeable. However, similar recovery time (t90%) (12 min) were estimated for both devices.

RR (%) = 𝐼 NH3 -𝐼 0 𝐼 0 x 100 (1)
Interestingly, the heterojunction devices based on Cu(F16Pc) sublayers show a current increase under NH3 exposure and current decrease during clean air recovery step (Figure 6c and 6d),

highlighting n-type semiconducting polarity of the device and key role played by the sublayer on the transport properties of the heterojunction devices. These devices showed a very stable baseline, higher RR and faster response and recovery times from those based on CuPc sublayer (Table S4). Moreover, the strong influence of different porphyrin tapes top layer is also exemplified, such that Cu(F16Pc)/pNiDMP exhibits much higher RR (788 %), faster response and recovery time than Cu(F16Pc)/pNiDPP device. However, it is worth mentioning that high RR of Cu(F16Pc)/pNiDMP device is partly because of very low range of baseline current (I0).

The opposite trend in the responses towards NH3 and faster kinetics in exposure and recovery cycles can be attributed to the different interfacial charges distribution in CuPc and Cu(F16Pc) based devices (Figure 5). Ammonia being an electron donating gas, acts as a chemical dopant of e -in the sensor top surface. Upon exposure, NH3 neutralizes h + in the p-type top layer, disturbing e -and h + accumulation equilibrium at the interface, concurrently decreasing the workfunction of the top layer, consequently top layer injects e -in the sublayer enhancing carrier density in the sublayer. The heterojunction device current is determined by free carriers concentration in the sublayer because electrodes are embedded there. Accordingly, current increase is noticed during NH3 exposure and decrease under recovery cycles. Faster kinetics of Cu(F16Pc) based sensors' responses and recovery can be also correlated with the nature of charges distribution at the interface. Notably, in the accumulation heterojunction (Figure 5a), free carriers are accumulated at the interface, turning it highly conducting. Since, free carriers (e -and h + ) are highly mobile, any external doping (such as e -from ammonia) is quickly delocalized and interface charge redistribution takes place in a short time. That is why, relatively shorter response and recovery time are obtained for Cu(F16Pc) based devices.

It is obvious from the previous discussion that heterojunction devices based on Cu(F16Pc) sublayer are better ammonia sensors at a fixed concentration, so further sensing characteristics of the devices towards variable ammonia concentrations and under the humid atmosphere were performed by employing short exposure and recovery cycles of 1 and 4 minutes, respectively, in a concentration range of 1 to 50 ppm of ammonia. The current variations of Cu(F16Pc)/pNiDPP and Cu(F16Pc)/pNiDMP devices submitted to different concentrations of ammonia in a range of 10 to 50 ppm, increasing in a step of 5 ppm and at a rh of 40 % are shown in Figure 7. The current increase associated with each exposure and decrease during the recovery periods are clearly noticeable for both the devices. Additionally, reponses are highly repeatable because similar variations in the current were obtained for 5 exposure-recovery cycles recorded at each concentration. At a first glance, Cu(F16Pc)/pNiDMP device appears a better NH3 sensor highlighted by a linear enhancement in the device current with increasing concentration, while a saturation in the current increase is noticeable at higher concentration in Cu(F16Pc)/pNiDPP device. However, it is worth noting that Cu(F16Pc)/pNiDMP device requires higher bias voltage (5 V) to produce a stable response compared to lower bias voltage (2 V) required for Cu(F16Pc)/pNiDPP device. Responses towards ammonia were also studied at lower concentrations in a range of 1-9 ppm (Figure S8) for both the devices. A calibration curve depicting sensors relative response as a function of ammonia concentration is shown for both the devices in Figure 7c and7d. It is obvious from these calibration curves that Cu(F16Pc)/pNiDMP sensor response is linear in the studied concentration range of 1-50 ppm, correlated through the equation ( 2) with correlation coefficient 0.998 (Figure 7c).

𝑅𝑅 𝑁𝐻3 = (6.67 × 𝐶 𝑁𝐻3 ) -10.10

As expected, similar calibration plot of the device based on Cu(F16Pc)/pNiDPP shows a nonlinear behavior in the studied ammonia concentration range, which RR in low concentration range is decribed by the linear equation ( 3) with a correlation cofficient 0.996.

𝑅𝑅 𝑁𝐻3 = (0.403 × 𝐶 𝑁𝐻3 ) (3)
RR of Cu(F16Pc)/pNiDMP sensor is up to 25 times higher than Cu(F16Pc)/pNiDPP as evident from the calibration plots, but mainly because of very low baseline current. Based on the calibration plots, sensors analytical parameters were determined. The slope of linear correlation of the calibration plots corresponds to sensitivity of the sensors, which is 6.66 % ppm -1 and 0.403 % ppm -1 for Cu(F16Pc)/pNiDMP and Cu(F16Pc)/pNiDPP devices, respectively. Such a high sensitivity of the device led us to obtain a limit of detection of ca. 1 ppm and 228 ppb for Cu(F16Pc)/pNiDMP and Cu(F16Pc)/pNiDPP devices, respectively, which are below the mandated international guidelines of ammonia exposure, thus making the devices suitable for commercial applications. The ammonia sensitivity was also investigated for CuPc sublayer based devices (Figure S9). They reveal huge drift in the baseline current coupled with low sensitivity values (S = -0.04 ppm -1 and -0.19 ppm -1 in the studied concentration range for CuPc/pNiDPP and CuPc/pNiDMP, respectively) and non-linear variations in the responses, making them unsuitable for ammonia sensing.

Humidity Effects on Ammonia Sensing

Humidity remains an important criterion to evaluate the performance of ammonia sensors considering the detection of ammonia in real environmental conditions. Accordingly, Cu(F16Pc)/pNiDMP and Cu(F16Pc)/pNiDPP devices' current variations under repeated exposure to 20 ppm of ammonia and recovery under clean air were investigated in variable rh in a range of 30-60 %. The sensors behavior as shown in Figure 8 exhibited a reversible response at a constant rh value and an enhancement in the response with increasing rh values, which are expected taking into account the electron donating nature of water molecules.

Notably, RR of Cu(F16Pc)/pNiDMP device experiences a larger variation from 4 % to 10 % compared to 6.5 % to 8.5 % noted for Cu(F16Pc)/pNiDPP (Figure 8c), which makes later as a better NH3 sensors in terms of stability under rh fluctuation. On the other hand, CuPc based devices were highly unstable and less sensitive in the similar rh range, exhibiting huge drift in the device baseline as well as very high interference in NH3 responses by rh (Figure S10).

The NH3 sensing performances such as RR, sensitivity, detection limit, stability of the present device are compared with the other heterojunction devices developed previously in our group and other NH3 sensors reported in literature. As summarized in Table S5, Cu(F16Pc)/pNiDPP performances are among the best NH3 sensors demonstrated by higher RR, sensitivity and lower detection limit from majority of the previously reported such sensors. Moreover, the present study also justifies the use of porphyrin tapes as a suitable alternative to LuPc2 in organic heterojunction devices to obtain a highly sensitive redox gas detection platform.

Conclusions

In conclusion, we undeniably demonstrated the potential of a new series of porphyrin tape/metal phthalocyanine heterojunction devices for the conductometric detection of NH3. The devices own performances suitable for commercial application and are synthetized relying on easily upscalable solvent-free methods. Two different porphyrin tapes, pNiDPP and pNiDMP, synthetized by oCVD were investigated as top layer. In pNiDPP, the free -ortho position on the phenyl substituents, allows a ring fusion affecting the porphyrin's π-system, the microstructural organization of the polymer and the conductivity of the film. Heterojunction drift is noticed under variable rh environment. Among different devices, Cu(F16Pc)/pNiDPP demonstrated minimum interference and highest stability at different rh levels and also showed a detection limit down to 228 ppb, which makes it among the best ammonia sensors and can be applied to detect NH3 in real conditions. In addition, the present work validates the successful integration of porphyrin tapes in organic heterojunction devices which will open a large window of new heterojunction devices development in future. These heterojunction sensing devices will be further investigated for a series of oxidizing and reducing gases and in depth sensors performances will be evaluated.

Experimental Section

Chemicals

CuPc was purchased from Sigma Aldrich and Cu(F16Pc) was synthesized according to a previously described method. [48] NiDPP and NiDMP were purchased from PorphyChem and used without further purifications. Iron(III) chloride (97 %), purchased from Sigma-Aldrich, was used as oxidant without further purifications.

Oxidative Chemical Vapor Deposition

The pNiDMP and pNiDPP thin films were prepared in a custom built oCVD reactor (details in Figure S1) using commercially available metalloporphyrins (NiDMP and NiDPP). (see Table S1 for detailed deposition conditions). The reference NiDMP and NiDPP thin films were prepared by simple sublimation in the same oCVD reactor. The samples prepared for the XRD analysis were obtained increasing the deposition time to 60 minutes.

Thin Film Characterization

The thickness of the porphyrin tapes thin films was evaluated by a spectroscopic ellipsometer

Devices and Electrical Measurements

The lateral thin-film conductivity was evaluated from a simple linear fit approximating all the samples to ohmic materials from two-point current-voltage scans recorded on chips patterned with interdigitated electrodes. The measurements were performed at room temperature and under ambient atmosphere and the geometry of the channel was 2.5 µm (length), 10 mm (total width), 40 nm (height). The data were recorded using a Keithley (2401) sourcemeter by sweeping the voltage from -4 V to 4 V and back (hysteresis scan) at a scan rate of 500 mV s -1 .

Chemosensing electrical measurements were carried out with Indium Tin Oxide (ITO) interdigitated electrodes (IDEs), separated by 75 m and lithographically patterned on a 1 x 1 cm² glass substrate. Thin films of the phthalocyanines were prepared by sublimation under secondary vacuum (ca. 10 -6 mbar) in UNIVEX 250 thermal evaporator (Oerlikon, Germany), by heating in a temperature range of 420-480°C. The deposition was performed at a rate of 1 Å s -1 determined by a Quartz Crystal Microbalance positioned close to the substrate and finally 50 nm of films were obtained for each of the phthalocyanine.

Ammonia sensing at different relative humidity (rh) was performed at a custom built automated workstation [41] connected with commercial cylinders of ammonia (985 ppm and 98 ppm in

Figure 4

 4 depicts the I(V) curves of 4 different heterojunction devices based on a bilayer of porphyrin tape on phthalocyanine, exhibiting a non-linear but symmetric characteristics (except CuPc/pNiDMP device).

  devices incorporating porphyrin tape and phthalocyanine exhibited non-linear I(V) characteristics attributed to formation of an energy barrier at the heterojunction interface because of workfunction difference between the porphyrin tape and the phthalocyanine. In fact, CuPc based devices formed accumulation-depletion heterojunction while Cu(F16Pc) based devices formed accumulation heterojunction. Accordingly, NH3 sensing properties of the device is determined as CuPc based devices experienced current decrease while Cu(F16Pc) based devices showed current increase under NH3 exposure and vice versa for the recovery under clean air, thus exhibiting p-type and n-type semiconducting polarity of these devices. Sensing properties of Cu(F16Pc) based devices is superior to CuPc based ones manifested by larger RR, faster adsorption/desorption kinetics and stable response for NH3 exposure and recovery periods. Moreover, RR of Cu(F16Pc) based devices are less affected by the variations in rh contrary to CuPc based devices which response become highly unstable and huge baseline

FS- 1 .

 1 The spectrometric ellipsometry measurements were acquired at a single angle of 65° using four different wavelengths, that is, 465, 525, 590 and 635 nm, and the data were fitted to a Cauchy model. The optical absorbance of the thin films deposited on glass substrate was measured in the range of 250-2000 nm with a UV/Vis/NIR spectrophotometer (PerkinElmer, Lambda 950) with a 150 mm-diameter integrating sphere. LDI-HRMS analyses were performed with an LTQ/Orbitrap Elite Hybrid Linear Ion Trap-Orbitrap Mass Spectrometer from Thermo Scientific coupled with an AP-LDI (ng) UHR source from MassTech Inc with a 355 nm Nd:YAG laser. The thin films were directly probed without any matrix deposition by the laser following a spiral motion during 30 seconds per sample. XPS analyses were performed on a Kratos Axis Ultra DLD instrument using a monochromatic Al Kα X-ray source (hυ = 1486.6 eV) at a power of 105 W. Charge calibration was accomplished by fixing the binding energy of the main carbon (C 1s) contribution to 285.0 eV, associated to the pyrrole rings forming the porphyrin macrocycles. Film surface morphology was investigated using the field emission scanning electron microscope, ZEISS Supra 55 VP. Film structure was analyzed by X-ray diffraction (XRD) in grazing incidence mode (0.5°) using a Bruker D8, equipped with a rotating anode of Cu Kα radiation (λ = 1.54 Å) operating at 20 kV and 40 mA.

Scheme 2 .

 2 Scheme 1. Structure of a) CuPc and b) Cu(F16Pc) c) pNiDPP and d) pNiDMP porphyrin tapes. The porphyrin tapes obtained from NiDPP can undergo an intramolecular dehydrogenative coupling (red line) inducing flattening of the molecular structure. From oCVD of nickel(II) porphyrins, double (blue dashed line) or triple bonds (green dashed lines) can be formed between the porphyrin units.

Figure 1 .

 1 Figure 1. UV/Vis/NIR analysis of pNiDPP (a) and pNiDMP (b) films deposited on glass. A comparison to the sublimed monomers (sNiDPP and sNiDMP) and an optical image of the films is provided. LDI-HRMS analysis of pNiDPP (a) and pNiDMP (b) films dimeric region. Comparison of the spectra with the simulated patterns for different unsaturation degrees (NiDPP -xH and NiDMP -xH) is provided.

Figure 2 .

 2 Figure 2. Valence band maxima obtained by XPS for pNiDPP, pNiDMP and their respective reference thin films, sNiDPP and sNiDMP.

Figure 3 .

 3 Figure 3. a) XRD patterns obtained from the analysis of pNiDMP (blue) and pNiDPP (red) films. b) FE-SEM images of pNiDPP and c) pNiDMP films at 80k magnification.

Figure 4 .

 4 Figure 4. The I(V) curves recorded with voltage sweeps from -10 V to 10 V for CuPc/pNiDPP (a), CuPc/pNiDMP (b), Cu(F16Pc)/pNiDPP (c) and Cu(F16Pc)/pNiDMP device (d).

Figure 5 .

 5 Figure 5. Representation of charges alignment at the interface of Cu(F16Pc) and CuPc based devices and electron doping from ammonia exposure.

Figure 6 .

 6 Figure 6. Typical current variation as a function of time for repeated alternate exposure periods of 90 ppm NH3 and recovery under clean air for CuPc/pNiDPP (a), CuPc/pNiDMP (b), Cu(F16Pc)/pNiDPP (c) and Cu(F16Pc)/pNiDMP (d) heterojunction devices.

Figure 7 .

 7 Figure 7. Current variations of Cu(F16Pc)/pNiDMP (a) and Cu(F16Pc)/pNiDPP (b) devices submitted to NH3 in the range 10-50 ppm, by steps of 5 ppm, during alternate exposure/recovery cycles (1 min/4 min), at 40% rh. RR variation as a function of NH3 concentration in 1-50 ppm range, in air, at 40 % rh, during exposure/recovery cycles (1 min/4 min) of Cu(F16Pc)/pNiDMP (c) and Cu(F16Pc)/pNiDPP (d) devices.

Figure 8 .

 8 Figure 8. Current variation as a function of time for Cu(F16Pc)/pNiDMP (a) and Cu(F16Pc)/pNiDPP (b) devices exposed to 20 ppm NH3, in humid air, in the range 30-60 % rh, during 1 min exposure and 4 min recovery cycles. Variations of RR with increasing and decreasing rh values for Cu(F16Pc)/pNiDMP (red circle) and Cu(F16Pc)/pNiDPP (black dot).

Figure S1 .

 S1 Figure S1. Laser desorption ionization high-resolution mass spectrometry (LDI-HRMS) of the (a) pNiDPP and reference sNiDPP thin films and (b) pNiDMP and reference sNiDMP thin films. The spectra of the pNiDPP and pNiDMP reveal the presence of oligomeric species and peak distributions related to the exchange of hydrogen by chlorine atoms deriving from the oxidant.

Figure S2 .

 S2 Figure S2. XPS spectra in the Ni 2p region for the pNiDPP, pNiDMP films and respective reference of the sublimed monomers.

Figure S5 .

 S5 Figure S5. Comparison between the XRD patterns of the NiDMP monomer powder (black) and pNiDMP thin film (blue).

Figure S6 .

 S6 Figure S6. Comparison between the XRD patterns of the NiDPP monomer powder (black) and pNiDPP thin film (red).

Figure S7 .

 S7 Figure S7. Comparison between the XRD patterns of sublimed NiDPP film (sNiDPP, blue), NiDPP powder (black) and pNiDPP film (red).

Table S2 .

 S2 Relative atomic concentration by XPS of the pNiDPP, sNiDPP, pNiDMP and sNiDMP thin films and theoretical composition of NiDPP and NiDMP.

		Ni (%)	N (%)	C (%)	Cl (%)	Fe (%)
	NiDPP (theo.)	2.7	10.8	86.5	-	-
	sNiDPP (exp.)	2.7	10.8	86.5	0.0	0.0
	pNiDPP (exp.)	1.6	5.7	88.2	2.7	1.8
	NiDMP (theo.)	2.3	9.3	88.4	-	-
	sNiDMP (exp.)	2.1	9.3	88.6	0.0	0.0
	pNiDMP (exp.)	1.4	5.8	87.9	2.7	2.2

Table S3 .

 S3 List and identification of the peaks observed by XRD for the pNiDPP and pNiDMP thin films.

		XRD PEAKS' ANALYSIS
	pNiDPP	pNiDMP	Reflection	hkl	d / Å
	2 theta	2 theta	order
	15.96°		n: 1	010	5.54(6)
		16.11°	n:1	010	5.49(5)
		20.30°			4.36(9)
	20.70°				4.28(6)
	22.35°	22.35°			3.97(3)
	25.58°	25.58°			3.47(8)
	29.68°	29.68°			3.00(6)
	31.00°				2.88(1)
		32.16°			2.77(9)
			or n: 2	020	5.55(9)
	32.37°				2.76(2)
			or n: 2	020	5.52(4)
	33.68°				2.65(7)
	37.48°				2.39(6)
	38.80°				2.31(8)

Table S5 .

 S5 Summary of the sensing properties of the present devices compared to the literature.[37][38][39][40][41][48][49][50][51][52][53][54]

	Devices	RR [%]	[NH3] [ppm]	S [% ppm -1 ]	LOD [ppb]	[NH3] [ppm]	T [°C]	rh [%]	Ref.
	Cu(F16Pc)/pNiDPP heterojunction	40	90	0.4	228	1-9	25	40	This work
	Cu(F16Pc)/pNiDMP heterojunction	788	90	6.7	1000	1-50	25	40	This work
	Co(Cl8Pc)/LuPc2 heterojunction	58	90	1.48	250	1-9	25	30	1
	Cu(Cl8Pc)/LuPc2 heterojunction	55	90	0.14	1200	1-9	25	30	1
	Cu(F16Pc)/LuPc2 heterojunction	67	90	1.5	280	1 -9	25	50	2
	DMBz/Cu(F16Pc)/LuPc2 heterojunction	138	90	3	140	1 -9	25	50	2
	TFBz/Cu(F16Pc) -LuPc2 heterojunction	50	90	1.1	2000	1 -9	25	50	2
	PTCDI/LuPc2 heterojunction	34	90	0.6		10 -30	25	50	3
	TPDO/Lu Pc2 heterojunction	26	90	0.2		30 -90	25	50	4
	PTFA/LuPc2 heterojunction	14	90	1.05	450	1 -6	25	50	5
	PDMA/LuPc2 heterojunction	14	90	2.23	314	1 -6	25	50	6
	PANI/CuTsPc chemiresistor	78	30	1.9		10 -30	25	50	7
	PPy chemiresistor	16	40	0.2	1000	40-75	25		8
	PEDOT/PSS-SWCNT chemiresistor	33	300	0.21	200	100 2 -			9
	CVD synthesized graphene chemiresistor	40	40	6 -0.09*	≈ 500	0.5 -1000*	25**		10
	MoO3-WO3 chemiresistor	1000	5	200		5			11
	CeO2 -PANI chemiresistor	550	50	11		2 -50			12

Acknowledgments

The authors gratefully acknowledge the financial support of the Luxembourg National Research Fund (FNR.lu) through the POLYPORPH project (C15-MS-10340560) and the Agence Nationale de la Recherche (ANR) for funding through the OUTSMART project (ANR-2015-CE39-0004-03). Financial support from the European Union (FEDER), Conseil Régional de Bourgogne Franche-Comté and the Conseil Régional de Bourgogne through the FABER and

the PARI SMT 08 and CDEA programs is gratefully acknowledged. We also thank the Conseil Régional de Bourgogne for providing funding through the CPER program. This work was also Table S1. Chemical vapor deposition reaction conditions for the preparation of the fused porphyrin thin films (pNiDPP and pNiDMP), heterojunction devices (CuPc/pNiDPP, Cu(F16Pc)/pNiDPP, CuPc/pNiDMP and Cu(F16Pc)/pNiDMP) and reference porphyrin thin films (sNiDPP and sNiDMP).