In graph theory, the Lovász number of a graph is a real number that is an upper bound on the Shannon capacity of the graph. It is also known as Lovász theta function and is commonly denoted by 
  
    
      
        ϑ
        (
        G
        )
      
    
    {\displaystyle \vartheta (G)}
  
, using a script form of the Greek letter theta to contrast with the upright theta used for Shannon capacity. This quantity was first introduced by László Lovász in his 1979 paper On the Shannon Capacity of a Graph.
 Accurate numerical approximations to this number can be computed in polynomial time by semidefinite programming and the ellipsoid method.
The Lovász number of the complement of any graph is sandwiched between the chromatic number and clique number of the graph, and can be used to compute these numbers on graphs for which they are equal, including perfect graphs.
 Let 
  
    
      
        G
        =
        (
        V
        ,
        E
        )
      
    
    {\displaystyle G=(V,E)}
  
 be a graph on 
  
    
      
        n
      
    
    {\displaystyle n}
  
 vertices. An ordered set of 
  
    
      
        n
      
    
    {\displaystyle n}
  
 unit vectors 
  
    
      
        U
        =
        (
        
          u
          
            i
          
        
        ∣
        i
        ∈
        V
        )
        ⊂
        
          
            R
          
          
            N
          
        
      
    
    {\displaystyle U=(u_{i}\mid i\in V)\subset \mathbb {R} ^{N}}
  
 is called an orthonormal representation of 
  
    
      
        G
      
    
    {\displaystyle G}
  
 in 
  
    
      
        
          
            R
          
          
            N
          
        
      
    
    {\displaystyle \mathbb {R} ^{N}}
  
, if 
  
    
      
        
          u
          
            i
          
        
      
    
    {\displaystyle u_{i}}
  
 and 
  
    
      
        
          u
          
            j
          
        
      
    
    {\displaystyle u_{j}}
  
 are orthogonal whenever vertices 
  
    
      
        i
      
    
    {\displaystyle i}
  
 and 
  
    
      
        j
      
    
    {\displaystyle j}
  
 are not adjacent in 
  
    
      
        G
      
    
    {\displaystyle G}
  
:
  The Lovász number 
  
    
      
        ϑ
      
    
    {\displaystyle \vartheta }
  
 of graph 
  
    
      
        G
      
    
    {\displaystyle G}
  
 is defined as follows:
  Let 
  
    
      
        G
        =
        (
        V
        ,
        E
        )
      
    
    {\displaystyle G=(V,E)}
  
 be a graph on 
  
    
      
        n
      
    
    {\displaystyle n}
  
 vertices. Let 
  
    
      
        A
      
    
    {\displaystyle A}
  
 range over all 
  
    
      
        n
        ×
        n
      
    
    {\displaystyle n\times n}
  
 symmetric matrices such that 
  
    
      
        
          a
          
            i
            j
          
        
        =
        1
      
    
    {\displaystyle a_{ij}=1}
  
 whenever 
  
    
      
        i
        =
        j
      
    
    {\displaystyle i=j}
  
 or vertices 
  
    
      
        i
      
    
    {\displaystyle i}
  
 and 
  
    
      
        j
      
    
    {\displaystyle j}
  
 are not adjacent, and let 
  
    
      
        
          λ
          
            max
          
        
        (
        A
        )
      
    
    {\displaystyle \lambda _{\max }(A)}
  
 denote the largest eigenvalue of 
  
    
      
        A
      
    
    {\displaystyle A}
  
. Then an alternative way of computing the Lovász number of 
  
    
      
        G
      
    
    {\displaystyle G}
  
 is as follows:
  The following method is dual to the previous one. Let 
  
    
      
        B
      
    
    {\displaystyle B}
  
 range over all 
  
    
      
        n
        ×
        n
      
    
    {\displaystyle n\times n}
  
 symmetric positive semidefinite matrices such that 
  
    
      
        
          b
          
            i
            j
          
        
        =
        0
      
    
    {\displaystyle b_{ij}=0}
  
 whenever vertices 
  
    
      
        i
      
    
    {\displaystyle i}
  
 and 
  
    
      
        j
      
    
    {\displaystyle j}
  
 are adjacent, and such that the trace (sum of diagonal entries) of 
  
    
      
        B
      
    
    {\displaystyle B}
  
 is 
  
    
      
        Tr
        ⁡
        (
        B
        )
        =
        1
      
    
    {\displaystyle \operatorname {Tr} (B)=1}
  
. Let 
  
    
      
        J
      
    
    {\displaystyle J}
  
 be the 
  
    
      
        n
        ×
        n
      
    
    {\displaystyle n\times n}
  
 matrix of ones. Then
  The Lovász number can be computed also in terms of the complement graph 
  
    
      
        
          
            
              G
              ¯
            
          
        
      
    
    {\displaystyle {\bar {G}}}
  
. Let 
  
    
      
        d
      
    
    {\displaystyle d}
  
 be a unit vector and 
  
    
      
        U
        =
        (
        
          u
          
            i
          
        
        ∣
        i
        ∈
        V
        )
      
    
    {\displaystyle U=(u_{i}\mid i\in V)}
  
 be an orthonormal representation of 
  
    
      
        
          
            
              G
              ¯
            
          
        
      
    
    {\displaystyle {\bar {G}}}
  
. Then
  The Lovász number has been computed for the following graphs:
 If 
  
    
      
        G
        ⊠
        H
      
    
    {\displaystyle G\boxtimes H}
  
 denotes the strong graph product of graphs 
  
    
      
        G
      
    
    {\displaystyle G}
  
 and 
  
    
      
        H
      
    
    {\displaystyle H}
  
, then
  If 
  
    
      
        
          
            
              G
              ¯
            
          
        
      
    
    {\displaystyle {\bar {G}}}
  
 is the complement of 
  
    
      
        G
      
    
    {\displaystyle G}
  
, then
  The Lovász "sandwich theorem" states that the Lovász number always lies between two other numbers that are NP-complete to compute. More precisely,
  The value of 
  
    
      
        ϑ
        (
        G
        )
      
    
    {\displaystyle \vartheta (G)}
  
 can be formulated as a semidefinite program and numerically approximated by the ellipsoid method in time bounded by a polynomial in the number of vertices of G.
For perfect graphs, the chromatic number and clique number are equal, and therefore are both equal to 
  
    
      
        ϑ
        (
        
          
            
              G
              ¯
            
          
        
        )
      
    
    {\displaystyle \vartheta ({\bar {G}})}
  
. By computing an approximation of 
  
    
      
        ϑ
        (
        
          
            
              G
              ¯
            
          
        
        )
      
    
    {\displaystyle \vartheta ({\bar {G}})}
  
 and then rounding to the nearest integer value, the chromatic number and clique number of these graphs can be computed in polynomial time.
 The Shannon capacity of graph 
  
    
      
        G
      
    
    {\displaystyle G}
  
 is defined as follows:
  For example, let the confusability graph of the channel be 
  
    
      
        
          C
          
            5
          
        
      
    
    {\displaystyle C_{5}}
  
, a pentagon. Since the original paper of Shannon (1956) it was an open problem to determine the value of 
  
    
      
        Θ
        (
        
          C
          
            5
          
        
        )
      
    
    {\displaystyle \Theta (C_{5})}
  
. It was first established by Lovász (1979) that 
  
    
      
        Θ
        (
        
          C
          
            5
          
        
        )
        =
        
          
            5
          
        
      
    
    {\displaystyle \Theta (C_{5})={\sqrt {5}}}
  
.
 Clearly, 
  
    
      
        Θ
        (
        
          C
          
            5
          
        
        )
        ≥
        α
        (
        
          C
          
            5
          
        
        )
        =
        2
      
    
    {\displaystyle \Theta (C_{5})\geq \alpha (C_{5})=2}
  
. However, 
  
    
      
        α
        (
        
          C
          
            5
          
          
            2
          
        
        )
        ≥
        5
      
    
    {\displaystyle \alpha (C_{5}^{2})\geq 5}
  
, since "11", "23", "35", "54", "42" are five mutually non-confusable messages (forming a five-vertex independent set in the strong square of 
  
    
      
        
          C
          
            5
          
        
      
    
    {\displaystyle C_{5}}
  
), thus 
  
    
      
        Θ
        (
        
          C
          
            5
          
        
        )
        ≥
        
          
            5
          
        
      
    
    {\displaystyle \Theta (C_{5})\geq {\sqrt {5}}}
  
.
 To show that this bound is tight, let 
  
    
      
        U
        =
        (
        
          u
          
            1
          
        
        ,
        …
        ,
        
          u
          
            5
          
        
        )
      
    
    {\displaystyle U=(u_{1},\dots ,u_{5})}
  
 be the following orthonormal representation of the pentagon:
  However, there exist graphs for which the Lovász number and Shannon capacity differ, so the Lovász number cannot in general be used to compute exact Shannon capacities.
 The Lovász number has been generalized for "non-commutative graphs" in the context of quantum communication. The Lovasz number also arises in quantum contextuality in an attempt to explain the power of quantum computers.