According to Boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions (it can also be described as an OR of AND’s). For each table an arbitrary T.B.T is given (total binary truth table) Boolean expression can be written as a disjunctive normal form. This paper considers a notation of a T.B.T, introduces a new concept of the hypergraphable Boolean functions and the Boolean functionable hypergraphs with respect to any given T.B.T. This study defines a notation of unitors set on switching functions and proves that every T.B.T corresponds to a minimum Boolean expression via unitors set and presents some conditions on a T.B.T to obtain a minimum irreducible Boolean expression from switching functions. Indeed, we generate a switching function in different way via the concept of hypergraphs in terms of Boolean expression in such a way that it has a minimum irreducible Boolean expression, for every given T.B.T. Finally, an algorithm is presented. Therefore, a Python programming(with complete and original codes) such that for any given T.B.T, introduces a minimum irreducible switching expression.
George Boole, an English mathematician, has published one of the works that founded symbolic logic in 1847. His combination of ideas from classical logic and algebra resulted in what is called Boolean algebra as a modern algebra(a complemented distributive lattice). By application of variables and symbols, Boole designed a language for describing and manipulating logical statements and determined if they are true or not(related notions had been considered by Gottfried Leibniz, who has defined the binary number system, which is the foundation of all digital computers, in 1680s). The variables stand for statements that are either true or false. The symbols +, * , - represent the logical symbols(Boolean operators) or, and, not, respectively and are equivalent in the truth tables in logic. Although truth tables use T and F (for true and false respectively) to indicate the state of the sentence, Boolean algebra uses 1 and 0, respectively. The relationship between Boolean algebra, set algebra, logic, and binary arithmetic has given a central role to Boolean algebra in the development of electronic digital computers. Besides that, its many applications in the design of computers, it forms the foundation of information theory because almost all search engines allow someone to enter queries in the form of logical expressions. Boolean algebra is based on propositions which are non-ambiguous sentences that can be either true or false. One can combine these propositions in a variety of ways using the connectives and, or, not. The results of these operations on propositions are demonstrated by the rules of Boolean algebra. Boolean algebra can be apply for designing and simplification of complex circuits present in computers because computer circuits are two-state devices off or on. This corresponds to the general representation of Boolean algebra with two elements, 0 and 1. There exists a function that can be utilized to evaluate any Boolean output in relation to its Boolean input by logical type of calculations. Such functions play a basic role in questions of complexity theory as well as the design of circuits and chips for digital computers. The properties of Boolean functions play a essential role in cryptography, particularly in the design of symmetric key algorithms. Boolean functions are often represented by sentences in propositional logic, and sometimes as multivariate polynomials over field , but more efficient representations are binary decision diagrams (BDD), negation normal forms, and propositional directed acyclic graphs (PDAG). In cooperative game theory, monotone Boolean functions are called simple games (voting games); this notion is applied to solve problems in social choice theory. Concepts of Boolean algebra were applied to electronic switching circuits by Claude Shannon in 1937; after that became a standard part of electronic design methodology by 1950s [3]. The notion of hypergraph has been introduced by Berge as a generalization of graph around 1960s, one of the initial concerns was to extend some classical results of graph theory; the notion of hypergraph has been considered as a useful tool to analyze the structure of a system. Further materials with regard to the graph and hypergraph are available in the literature too [2, 9–11]. Graphs and hypergraphs can be applied to describe the network systems. Nowadays, some features of hypergraphs are applied significantly in computer science such as in machine learning. There has been a lot of research about the application of hypergraphs in relational databases might have been viewed as a sort of data mining. The reason is that why hypergraphs seem proper to demonstrate relations in information systems, social networks, document centered information processing, web information systems, and computer science, the relationships among services within a service oriented architecture [4, 8].
With regard to these points, this paper considers the concept of hypergraphs and their application in computer science. The notation of switching functions has been considered and investigated the relationship between of hypergraphs and switching functions. This study, for given T.B.T(total binary truth table), presents a new concept of hypergraphable Boolean functions and Boolean functionable hypergraphs. Indeed, we for any Boolean function construct a hyperdiagram which is called a hyperdiagram based on a given Boolean function and we investigate some condition that is a hypergraph based on a given Boolean function. Also for all arbitrary hypergraph, we extracted a Boolean function titled Boolean functionable hypergraph. It is demonstrated that every hypergraph is a Boolean functionable hypergraph. Based on these points a question is presented: Does it correspond to a switching expression from any given T.B.T?
The main motivation for this paper is the extraction of an irreducible switching expression from each T.B.T. So we define the concept of Boolean function–based hypergraph and the notation of unitors set of Boolean functions. Finally, these concepts has been applied it is proved that every T.B.T corresponds to a minimum Boolean expression via unitors set and presents some conditions on T.B.T to obtain a minimum irreducible Boolean expression from switching functions.
Preliminaries
In this section, some definitions and results are presented as follows:
Let X be an arbitrary set. Then we denote P* (X) = P (X)\∅, where P (X) is the power set of X.
Definition 2.1. Let G = {x1, x2, …, xn} be a finite set. A hypergraph on G is a pair such that for all 1 ≤ i ≤ m, ∅ ≠ Ei ⊆ G and . The elements x1, x2, …, xn of G are called vertices, and the sets E1, E2, …, Em are called the edges (hyperedges) of the hypergraph H. For each 1 ≤ k ≤ m if |Ek|≥2, then Ek is represented by a continuous curve joining its vertices, if |Ek|=1 by a cycle on the element (loop). If for all 1 ≤ k ≤ m |Ek|=2, the hypergraph becomes an ordinary (undirected) graph.
Definition 2.2. [4] Let G = {x1, x2, …, xn} be a finite set. A hyperdiagram on G is a pair such that for all 1 ≤ k ≤ m, Ek ⊆ G and |Ek|≥1. Clearly every hypergraph is a hyperdiagram, while the converse is not necessarily true.
We say that two hyperdiagrams and are isomorphic if m = m′ and there exists a bijection φ : G → G′ and a permutation τ : {1, 2, …, m} → {1, 2, …, m′} such that for all x, y ∈ G, if for some 1 ≤ i ≤ m, x, y ∈ Ei, then φ (x) , φ (y) ∈ Eτ(i), if for all 1 ≤ i ≤ m, x, y ∉ Ei, then φ (x) , φ (y) ∉ Eτ(i) and if for some 1 ≤ i ≤ m, x ∈ Ei, for all 1 ≤ j ≤ m, y ∉ Ej, then φ (x) ∈ Eτ(i) and φ (y) ∉ Ej. Since every hypergraph is a hyperdiagram, we define an isomorphic hypergraphs in a similar a way.
(Switching)Boolean functions and hypergraphs
In this section, we apply a notation of total binary truth table(T.B.T) on Boolean variables and introduce the concept of hypergraphable Boolean functions, Boolean functionable hypergraphs; also, we investigate some of their properties. We consider every (switching)Boolean functionf : Bn → B = {0, 1} by , where for all is a literal(Boolean variable or the complement of a Boolean variable) and . Let , x1, x2, …, xn be arbitrary Boolean variables and for all 0 ≤ j ≤ m, f(m) (x1, x2, …, xn) be Boolean functions. We will denote a total binary truth table(T.B.T) on Boolean variables x1, x2, …, xn by a set , where for all 0 ≤ j ≤ m, f(m) (x1, x2, …, xn), are Boolean functions(see Table 1) and for m = 0, we will denote it by .
T. B. T with n variables
x1
x2
…
xn
f(0) (x1, …, xn)
f(1) (x1, …, xn)
…
f(m) (x1, …, xn)
0
0
…
0
…
0
0
…
1
…
⋮
⋮
⋮
⋮
⋮
⋮
⋮
0
0
…
1
…
1
1
…
1
…
Define a binary operation “+” on by (f + f′) (x1, …, xn) = f (x1, …, xn) + f′ (x1, …, xn), a binary operation “.” on by (f . f′) (x1, …, xn) = f (x1, …, xn) . f′ (x1, …, xn) and a unary operation by c (xi) =1 - xi, and c (f (x1, …, xn)) =1 - f (x1, …, xn). Clearly is a Boolean algebra.
Example 3.1. Consider a T.B.T in Table 2. The binary operations together with a unary operation are computed in this Table.
T.B.T
x1
x2
x3
f
g
f + g
f . g
c (f)
0
0
0
1
1
1
1
0
0
0
1
1
1
1
1
0
0
1
0
1
0
1
0
0
0
1
1
0
0
0
0
1
1
0
0
1
0
1
0
0
1
0
1
1
1
1
1
0
1
1
0
0
1
1
0
1
1
1
1
0
1
1
0
1
Definition 3.2 Let be a T.B.T.
for all 1 ≤ j ≤ m, consider and , where .
Boolean function f (x1, …, xn) is called a hypergraphable Boolean function, if Hf is a hypergraph and we say Hf is a hypergraph based on a Boolean function f (x1, …, xn).
Let be a hypergraph. Then H′ is sailed to be a Boolean functionable hypergraph, if there exists a Boolean function as f (x1, …, xn) such that Hf ≅ H′ and we call a Boolean function f (x1, …, xn) is obtained from hypergraph H′.
Because each hypergraph is a hyperdiagram, we have the following lemma:
Lemma 3.3.Let be a T.B.T. Then f (x1, x2, …, xn) is a hyperdiagramable Boolean function.Proof. Let be a Boolean function. Thus is a hyperdiagram, where for all 1 ≤ j ≤ m, and . □ Let f (x1, …, xn) be a Boolean function. From now on, we denote the hyperdiagram based on Boolean function f (x1, …, xn) by f↗ (x1, …, xn).
Example 3.4. (i) Let f (x, y, z) = x′y′z + x′y′z′. Then, we have the hyperdiagram in Figure 1, where a nd (by definition, the vertices x, y do not belong to every hyperedge).
Hyperdiagram f↗ (x, y, z).
Since z′} = Gf, so is not a hypergraph. Thus, f (x, y, z) is not a hypergraphable Boolean function.
(ii) Let g (x, y, z) = xz′ + xyz + yz′. So we obtain the hypergraph in Figure 2, where and Thus g (x, y, z) is a hypergraphable Boolean function.
Hypergraph g↗ (x, y, z).
Theorem 3.5.Every hypergraph is a Boolean functionable hypergraph.
Proof. Let be an arbitrary hypergraph, where G = {g1, g2, …, gn}. Now, define a bijection φ : G → G′ = {x1, x2, …, xn} by and for all . Clearly and we consider for all where for we have If , then it is easy to see that H′f ≅ H′ ≅ H and so it is a Boolean functionable hypergraph. □ Let be a hypergraph. From now on, we denote the each Boolean function which is obtained from hypergraph by H↙ and
.
Example 3.6. Consider the hypergraph in Figure 3. Define a bijection φ : G → G′ by , where for all . So, we obtain , where and We consider , and . Then, it is easy to see that H′f ≅ H′ ≅ H and so it is a Boolean functionable hypergraph.
Hypergraph H.
Corollary 3.7.Let be a hypergraph. Then
(H↙) ↗ ≅ H.
.
.
In Example 3.4 (i), since f↗ is not a hypergraph(but f↗ always is a hyperdiagram), we can not obtain the Boolean function (f↗) ↙ .
Theorem 3.8.Let be a T.B.T. If f is a hypergraphable Boolean function, then (f↗) ↙ ∼ f.
Proof. Since f (x1, x2, …, xn) is a hypergraphable Boolean function, we get is a hypergraph, where for all 1 ≤ j ≤ m, and . Consider . Indeed, by Theorem 3.5, g (x1, x2, …, xn) = (f↗) ↙ (x1, x2, …, xn) □
Example 3.9. Consider f (x, y, z) = xz′ + xy′z + yz′. So we obtain the hypergraph in Figure 4, where and Thus f (x, y, z) is a hypergraphable Boolean function.
So by Theorem 3.8,
Theorem 3.10.Let be a T.B.T. If f (x1, x2, …, xn) is a d.n.f and m ≥ 1 +2n-1, then it is a hypergraphable Boolean function.
Proof. Let x1, x2, …, xn be arbitrary Boolean variables. Then, we reconstruct a minterm of disjunctive normal form(d.n.f) of Boolean function f (x1, x2, …, xn) in a form such that all its literal be complement of Boolean variables and denote by . Then, we consider the following sequence of minterms(with at most complement of variables) of f (x1, x2, …, xn):
If , then, by above sequence xn-k+1 is fixed and for all 0 ≤ i ≤ k - 2, the variable xn-i has two cases self variable or its complement; hence, a Boolean function xn-k+1xn-k+2 … xn-1xn has 2k-1 cases, where 1 ≤ k ≤ n - 2. It follows that for all k ≤ n - 2 at least a literal has not in a form self variable; therefore, we have 2 + 2 +22 + … +2(n-2) = 2(n-1) choices such that at least a literal has not in a form self variable. Thus, if m ≥ 1 +2n-1, then a disjunctive normal form(d.n.f) of Boolean function f (x1, x2, …, xn) is a hypergraphable Boolean function. □
Example 3.4 (i), demonstrate that f (x, y, z) is not a hypergraphable Boolean function, while it is a d.n.f. By Theorem 3.10, if f (x, y, z) = (x′y′) z′ + (x′y′) z + (x′) yz′ + (x′) yz, then, d.n.f f (x, y, z) is not a hypergraphable Boolean function.
Definition 3.11. Let and be a T.B.T. For all 1 ≤ j ≤ 2n define Unitor (fj) = {(x1, x2, …, xn) | fj (x1, x2, …, xn) =1} and will denote by Un (fj), in the same way Unitor (f) is defined and it is denoted by Un (f).
Theorem 3.12.Let and be a T.B.T. Then
;
Un (f′) = Un (f) if and only if f ∼ f′;
If Un (f′) ⊆ Un (f), then (f + f′) ∼ f;
Un (f + f′) = Un (f) ∪ Un (f′);
Un (f . f′) = Un (f) ∩ Un (f′);
Un (c (f)) = Bn \ Un (f).
Proof. It is clear by definition. □
Corollary 3.13.Let and be a T.B.T. If (f + f′) ∼ f, then |Un (f′) | ≤ |Un (f) |.
Proof. Since (f + f′) ∼ f, by Theorem 3.12, Un (f + f′) = Un (f). It follows that Un (f) ∪ Un (f′) = Un (f + f′) = Un (f) and so Un (f′) ⊆ Un (f). □
Switching expression based on hypergraph
In this section, we consider an arbitrary T.B.T; with respect to the concept of unitors set, it looks to extract associated switching expression to given T.B.T. Indeed, we show that every T.B.T, corresponds to a hypergraph and with the application of intersection hyperedges of associated hypergraph, we generate a minimum Boolean expression. We prove that minimum Boolean expression that is obtained from any given T.B.T is not same to its D.N.F.
Theorem 4.1.Let . Then every corresponds to a hypergraph.
Proof. Let x1, x2, …, xn be arbitrary Boolean variables. Consider a total binary truth table (T.B.T) in Table 1. Suppose that for and for all i ∈ {j1, j2, …, jk}, we have Un (fi)≠ ∅. Since if and only if for all , for all j1 ≤ i ≤ jk define , where . Now, for all j1 ≤ i ≤ jk, set
Thus, it is easy to see that is a hypergraph. □
We will call the hypergraph H in Theorem 4.1, as Boolean function–based hypergraph and will denote by .
Example 4.2. Consider a T.B.T in Table 3. Computations demonstrate that . Now, it is obtained a Boolean function–based hypergraph in Figure 5.
Hypergraph f↗ (x, y, z).
Hypergraph .
T. B. T with 3 variables
x1
x2
x3
f (x1, x2, x3)
0
0
0
f1 (x1, x2, x3) =0
0
0
1
f2 (x1, x2, x3) =1
0
1
0
f3 (x1, x2, x3) =1
0
1
1
f4 (x1, x2, x3) =0
1
0
0
f5 (x1, x2, x3) =1
1
0
1
f6 (x1, x2, x3) =0
1
1
0
f7 (x1, x2, x3) =0
1
1
1
f8 (x1, x2, x3) =1
Define a relation ∼ on a T.B.T by f ∼ f′ if and only if for all (x1, x2, …, xn) ∈ Bn, we have f (x1, x2, …, xn) = f′ (x1, x2, …, xn) (f ≡ f′). It is clear that ∼ is a congruence equivalence relation on . For 0 ≤ j, j′ ≤ m, we say that and are equivalent, if f(j) ∼ f(j′).
Theorem 4.3.Let 0 ≤ j, j′ ≤ m. If and are equivalent, then their Boolean function–based hypergraph are isomorphic.
Proof. Let 0 ≤ j, j′ ≤ m. Since , for all 1 ≤ i ≤ 2n we get that . Using Theorem 4.1, corresponds to if and only if corresponds to . Hence □
Definition 4.4. Let , 1 ≤ k ≤ n and be a T.B.T, where for 0 ≤ t ≤ m, f(t) (x1, …, xn) . Then
;
.
Example 4.5. Consider a T.B.T in Table 3. Simple computations demonstrate and |P (1, x1, 1) |=4.
Theorem 4.6.Let and be a T.B.T. Then, |P (k = j, x1, x2, …, xk, 1) |=2n-j.
Proof. Let x1, x2, …, xj be j Boolean variables. Then, if and only if x1 = x2 = … = xj = 1. So or . Now, if and only if for some j + 1 ≤ t ≤ n we have where have 2n-j - 1 cases. In addition, if and only if for all j + 1 ≤ t ≤ n we have So |P (j, x1, x2, …, xj, 1) |=2n-j. □
Corollary 4.7.Let and be a T.B.T. Then
if k = 1, then |P (k, x1, x2, …, xk, 1) |=2n-1;
if k = n - 1, then |P (k, x1, x2, …, xk, 1) |=2;
if k = n - i, then |P (k, x1, x2, …, xk, 1) |=2i;
if k = n, then |P (k, x1, x2, …, xk, 1) |=1.
Let and be a T.B.T, 1 ≤ k ≤ n, 0 ≤ t, t′ ≤ m. Define and . So we have the following Theorem.
Theorem 4.8.Let and f(m), x1, …, xn) be a T.B.T, 1 ≤ k ≤ n, 0 ≤ t, t′ ≤ m. Then
;
I (n, 1, 1) =2n and I (n, 0, 1) =0;
.
Proof. (i) Let 1 ≤ k ≤ n. Then by Corollary 4.7, we obtain that .
(ii) In the same way it is obtained from Corollary 4.7.
(iii) Let 1 ≤ k ≤ n, 1 ≤ j ≤ 2n. Because or , for all 1 ≤ j ≤ 2n, we get that or . If , then . If , since for all by item (ii), we have
□
Theorem 4.9.Let and x1, …, xn) be a T.B.T, 1 ≤ k ≤ n, 1 ≤ i ≤ 2n, 0 ≤ t, t′ ≤ m. Then
I (n, f(t)+ f(t′), 1) = [I (n, f(t), 1) + I (n, f(t′), 1)] - I (n, f(t)f(t′), 1) ;
I (n, f(t)f(t′), 1) ≤ min {I (n, f(t), 1) , I (n, f(t′), 1)}.
Proof. (i) Because for all 1 ≤ j ≤ 2n and 1 ≤ t ≤ m we have and or there exists 1 ≤ j ≤ 2n such that , so by Theorem 4.8 (iii), the proof is obtained.
(ii) By definition, for all if and only if , so
and
Hence I (n, f(t)f(t′), 1) ≤ min {I (n, f(t), 1) , I (n, f(t′), 1)}. □
Corollary 4.10.Let and be a T.B.T. Then (f + f′) ∼ f if and only if I (n, f + f′, 1) = I (n, f, 1).
Theorem 4.11.Let and be a T.B.T. If there exists some 1 ≤ i1, i2, …, ik ≤ n such that , then I (n, f + f′, 1) >2n-k.
Proof. Let 1 ≤ i1, i2, …, ik ≤ n and . By Theorem 4.9,
□
Theorem 4.12Let and be a T.B.T and , where 1 ≤ i1, i2, …, ik ≤ n.
If I (n, f, 1) <2n-1, then (f + f′) ≁ f;
If I (n, f′, 1) = I (n, f, 1) and Un (f′) ⊆ Un (f) imply that f′ ∼ f;
Proof. (i) Let (f + f′) ∼ f. Using Theorem 4.9, I (n, f + f′, 1) = I (n, f, 1) + I (n, f′, 1) - I (n, f . f′, 1). Because I (n, ff′, 1) ≤ min {I (n, f, 1) , I (n, f′, 1)}, we get that I (n, f + f′, 1) ≥ I (n, f, 1) +2n-k - I (n, f, 1) =2n-k, which is a contradiction.
(ii) Let f′ (x1, …, xn) =1. Then Un (f′) ⊆ Un (f) implies that (x1, …, xn) ∈ Un (f) and so f (x1, …, xn) =1. Suppose that f′ (x1, …, xn) =0, then Un (f′) ⊆ Un (f) implies that (x1, …, xn) ∈ Un (f) \ Un (f′) or (x1, …, xn) ∉ Un (f). If (x1, …, xn) ∉ Un (f), then f (x1, …, xn) =0 and in this case f ∼ f′. If (x1, …, xn) ∈ Un (f), then f (x1, …, xn) =1 and it follows that I (n, f′, 1) < I (n, f, 1), which is a contradiction. □
Theorem 4.13.Every T.B.T corresponds to a Boolean expression.
Proof. Let and be a T.B.T. If for all 1 ≤ j ≤ 2n, fj (x1, x2, …, xn) =0, then consider g (x1, x2, …, xn) ≡0. In a similar a way that, if for all 1 ≤ j ≤ 2n, fj (x1, x2, …, xn) =1, then consider g (x1, x2, …, xn) ≡1. Now, if there exist and 1 ≤ j1, j2, …, jk ≤ 2n such that fjk (x1, x2, …, xn) =1, then consider in such a way that for all . The application of Theorem 4.1, is a hypergraph, where for all 1 ≤ j ≤ k, and for all 1 ≤ i ≠ j ≤ k we set Fij = Ei ∩ Ej. If for all 1≤ i ≠ j ≤ k, Fij = ∅, then consider . In this case, since for all , by Theorem 3.12, Un (f) = Un (g) and so f (x1, x2, …, xn) = g (x1, x2, …, xn) . If there exist 1 ≤ r ≤ k and i ≠ j ∈ {i1, i2, …, ir} such that Fij≠ ∅, consider . Clearly for all i1 ≤ i, j ≤ ir, Un (gij) ⊆ Un (f), so if I (n, dis∑substacki1≤i≤iri1≤j≤isgij, 1) = I (n, f, 1), thus by Theorems 3.12 and 4.12, g ∼ f, where g (x1, x2, …, xn) = dis∑substacki1≤i≤iri1≤j≤isgij (x1, …, xn). But if I (n, dis∑substacki1≤i≤iri1≤j≤isgij, 1) < I (n, f, 1), consider 1 ≤ s ≤ k, j ∈ {j1, j2, …, js} and such that Un (dis∑substacki1≤i≤iri1≤j≤isgij) ≠ Un (fj) ⊆ Un (f) and . Thus by Theorem 4.12, we get that g ∼ f, where . □
Consider a T.B.T and . Clearly, f ∼ f, and so . We say that f has a minimum Boolean expression if, there exists such that m is the minimum natural in such a way that g = g1 + g2 + … + gm.
Theorem 4.14.Every T.B.T corresponds to a minimum Boolean expression.
Proof. Let and be a T.B.T. Using Theorem 4.13, and there exists a hypergraph , where for all 1 ≤ j ≤ k, . Thus, there exist and Boolean functions g1, g2, …, gm in such a way that f ∼ (g1 + g2 + … + gm), where for all 1 ≤ i ≤ m, there exist 1 ≤ j, j′ ≤ k in such a way that and . In addition, if for all 1≤ j, j′ ≤ k, Fjj′ = ∅, we consider k = m and , where . If there exist 1 ≤ j, j′ ≤ k in such a way that , we select 1 ≤ j, j′ ≤ k such that |Fjj′| = n - 1 and . Clearly, , so if , then f ∼ g. But if , we consider the minimum 1 ≤ i ≤ k, and Boolean functions fi such that g′ = dis∑ifi, Un (g) ≠ Un (g′) ⊆ Un (f) and . Because , by Theorem 4.12, we get that (g + g′) ∼ f. □ Let . A hypergraph is called a λ-intersection hypergraph, if for all 1 ≤ i, j ≤ k, we have |Ei ∩ Ej| = λ.
Theorem 4.15.Let and be a T.B.T. If is a 0-intersection hypergraph, then the T.B.T corresponds to an irreducible Boolean expression.
Proof. The application of Theorem 4.13, and there exists a hypergraph , where for all 1 ≤ j ≤ k, . Thus, there exist and Boolean functions g1, g2, …, gm in such a way that f ∼ (g1 + g2 + … + gm). Since is an 0-intersection hypergraph, for all 1 ≤ j, j′ ≤ m we get that |Fjj′|=0. It follows that and so
and so f (x1, x2, …, xn) is an irreducible Boolean expression. □
The following Example demonstrates that the converse of Theorem 4.15, is not necessarily true.
Clearly is an 2-intersection hypergraph, while the T.B.T corresponds to a reducible Boolean expression.
(ii) Consider a T. B. T in Table 4. Obviously, is an 1-intersection hypergraph, while the T.B.T corresponds to an irreducible Boolean expression.
Let . A hypergraph is called a strong λ-intersection hypergraph, if for some 1 ≤ i, j ≤ k, we have 1 ≤ |Ei ∩ Ej| ≤ λ.
Theorem 4.17.Let and be a T.B.T. If is an (n - 2)-intersection hypergraph, then the T.B.T corresponds to an irreducible Boolean expression.
Proof. The application of Theorem 4.13, and there exists a hypergraph , where for all 1 ≤ j ≤ k, . Thus, there exist and Boolean functions g1, g2, …, gm in such a way that f ∼ (g1 + g2 + … + gm). Since is an (n - 2)-intersection hypergraph, for all 1 ≤ i, j ≤ m we get that |Fij| = n - 2. It follows that and so
, where for all and . Hence, g (x1, x2, …, xn) is an irreducible Boolean expression. □
The method for the construction of a Boolean expression from a T.B.T is explained in Table 5, Algorithm 1 based on Theorem 4.14.
Algorithm 1
Begin:
1. Input a T.B.T .
2. If f ≡ 0 or f ≡ 1, then consider g ≡ 0 or g ≡ 1, respectively.
3. If there exists j ∈ {1 ≤ j1, j2, …, js ≤ 2n}, such that fj (x1, x2, …, xn) =1, then
consider .
With regard to the step 3 consider the following formula:
4. For all 1 ≤ i ≠ j ≤ k and , set Fij = Ei ∩ Ej.
5. If for all 1≤ i ≠ j ≤ k, Fij = ∅ or |Fij| < n - 1, then consider .
6. If there exists 1 ≤ r ≤ k, and i ≠ j ∈ {i1, i2, …, ir} such that Fij≠ ∅ and
|Fij| ≥ n - 1, then put
7. If I (n, dis∑substacki1≤i≤iri1≤j≤isgij, 1) = I (n, f, 1), then consider g (x1, x2, …, xn) =
∑substacki1≤i≤iri1≤j≤isgij (x1, …, xn) that Un (gij) ⊆ Un (f) .
8. If I (n, dis∑substacki1≤i≤iri1≤j≤isgij, 1) < I (n, f, 1), then consider 1 ≤ s ≤ k, j ∈ {j1, j2, …, js},
such that Un (dis∑substacki1≤i≤iri1≤j≤isgij) ≠ Un (fj) ⊆ Un (f) and
Let H = {x, y, z, x′, y′, z′}. Consider the undirected hypergraph in Figure 7, where E1 = {x′, y′, z′} , E2 = {x′, y, z′} , E3 = {x′, y, z} and E4 = {x, y, z′} .
Undirected hypergraph
Since E1 ∩ E2 = {x′, z′}, E1 ∩ E3 = {x′} , E1 ∩ E4 = {z′} , E2 ∩ E3 = {x′, y} , E2 ∩ E4 = {y, z′} and E3 ∩ E4 = {y}, we get that f (x, y) = x′z′ + x′y + yz′.
Accessible minimum boolean expression based on a program
In this subsection, we present a program(Python programming) to accesses of minimum Boolean expression for any given T.B.T, based on the Algorithm 1, Table 5.
1 import xlrd
2
3 sheet = xlrd.open_workbook("input.xlsx").sheet_
by_index(0)
4
5 element_names = sheet.row_values(0)[:-1]
6 elements = []
7 for i in range(1, sheet.nrows):
8 elements.append(sheet.row_values(i)) 9 10 if len(elements) != pow(2, len(element_names)): 11 print("Error in input file, rows count isn’t equal
to 2∧n.") 12 exit(0) 13 14 E_i = [] 15 for i, elm in enumerate(elements): 16 if(elm[-1] == 1): # check if f is equal to 1 17 E = [] 18 for c in range(0, len(elm)-1): 19 if(elm[c] == 1):
34 if len(E_i) == 0: 35 print_g("0") 36 37 F_ij = [] 38 for i in E_i: 39 F = [] 40 for j in E_i:
41 if(i != j): 42 intersection = [x for x in i[1] if x in j[1]] 43 if(len(intersection) > = (len(element_names)-1)): 44 F.append([j[0], intersection]) 45 if(F): 46 F_ij.append([i[0], F]) 47
48 if(F_ij == []): 49 g = [] 50 for i in E_i: 51 g.append("".join(i[1])) # multiply elements 52 print_g("+".join(g)) 53 54 g_ij = []
55 for i in F_ij: 56 for j in i[1]: 57 g_ij.append("".join(j[1])) # multiply elements 58 g_ij = list(dict.fromkeys(g_ij)) # remove duplicates 59 sigma_g_ij = "+".join(g_ij) 60 61
62 def calc_mult_and(expr): 63 expr = expr.split("+") 64 for i in expr: 65 if "0" not in i: 66 return 1 67 return 0 68
69 true_g_ij = [] 70 for elm in elements: 71 tmp_g = sigma_g_ij 72 for c in range(0, len(elm)-1): 73 if(elm[c] == 1): 74 tmp_g = tmp_g.replace(element_names[c]+"’", "0") 75 tmp_g = tmp_g.replace(element_names[c], "1")
76 else: 77 tmp_g = tmp_g.replace(element_names[c]+"’", "1") 78 tmp_g = tmp_g.replace(element_names[c], "0") 79 true_g_ij.append(calc_mult_and(tmp_g)) 80 81 f_j = [] 82 for i, elm in enumerate(elements):
83 if(elm[-1] == 1 and true_g_ij[i] == 0):
84 f_j.append("".join([x for x in E_i if x[0] == i][0][1]))
85
86 print_g("+".join(g_ij + f_j))
Remark 4.1. We take n as number of variables in table, and k as number of elements of Ej. Then
T (Ej) = O (n × 2n), because one outer loop through rows and one inner loop through columns.
T (Fij) = O (k2 × n), because two nested loops through elements of Ej and one inner loop for getting intersection.
If for 1 ≤ j ≤ 2n, Fj (x1, . . . , xn) =0 or Fj (x1, . . . , xn) =1 complexity is O (2n) for one loop through rows.
Others complexity is T (Ej) + T (Fij) = O (n × (k2 + 2n)).
Application of switching function based on hypergraphs
In this section, we introduce some real life applications of switching function based on hypergraphs.
Three-Floor Elevator: Numerous functions must be performed by the circuitry of an elevator (open/close door, move up/down, light up/down indicator and so on. This focuses on one aspect of a three-floor elevator, deciding when to move to other floor. Five inputs are needed.
x= first floor button. (1=pushed, 0=not pushed)
y= second floor button. (1=pushed, 0=not pushed)
z= third floor button. (1=pushed, 0=not pushed)
the present floor indicator requires two bits (w and t): 01 for first floor, 10 for second floor, 11 for third floor. Note that 00 is an impossible combination and output f (x, y, z, w, t)=move function (1=move or change floor, 0=stay). A hypergraph is modified based on move deciding as follows:
Now by Algorithm 1, for all 1 ≤ i ≠ j ≤ 9, set Fij = Ei ∩ Ej. So, we have
The application of Theorem 4.17, we obtain Boolean expression based above hypergraph as f (x, y, z, w, t) = x′zw′t + y′zwt′ + xy′z′w + xy′wt′ + x′yz′t + x′yw′t + xz′wt + yz′wt . For instance f (1, 1, 1, 1, 1) =0, implies that elevator does not move.
Social Networks: Emotional intelligence is a conceptualization which progressively discussed in social psychology. Recently, emotional intelligence has been given much concentration in research especially in psychological research. Academic success or success is the product of instruction the extent to which a student, educator, and institution have attained their educational aims. It is defined as the degree to which students attain the information, proficiency, aptitudes, and skills that the teacher is going to teach or assign. Numerous investigations have revealed that there is a positive relationship between higher level of emotional intelligence and excellent academic success among adolescent students. Let X={Alexander, Daniel, Michael, Thomas, William} be a set of 5 students who are chosen to an associated research and answered the researcher’s questions with 6 questions, where students are free to answer some questions (1=correct, 0=incorrect, X= positive answer, X’= negative answer). Suppose that 1 ≤ i ≤ 6, Ei be a set of students who answered to i-th question. We want to find a target function f (A, D, M, T, W) in such a way that researcher decides to start a related work or not. Thus, we obtain a hypergraph as follows:
Now by Algorithm 1, for all 1 ≤ i ≠ j ≤ 6, set Fij = Ei ∩ Ej. So we have
Using Theorem 4.17, we obtain Boolean expression based above hypergraph as f (A, D, M, T, W) = ADMW′ + AMT′W′ + A′DM . For instance, f (0, 1, 1, 1, 0) =1, implies that researchers start their project and they can make the right decision. The importance of this issue is best seen when the number of participants in these questionnaires is more than ten students. For this reason 1024 cases should be checked. This is very difficult with T · B · T table.
Logic Circuit: Logic circuit is one that treats like a switch, i.e. a two-positive devise with ON or OFF states. This is called as binary device, in which the ON state is represented by 1 and the OFF state by 0. We require to devising a logic statement which can be expressed in only one of the two forms. For instance, computers store information in gigabytes, megabytes, and so on. The fundamental unit of storage is the bit or binary digit, which is similar to a switch. Like a switch, which has two states on or off, the bit has two states 1 and 0 (sometimes represented as true and false. We apply this abstraction to represent numbers with the binary number system. In order to perform calculations, the computer manipulates bits by means of logical operations which use inputs to yield a particular output based on the input bits states. To define the logic clearly, the truth table is used to which express the outputs in terms of all combinations of inputs. A logic gate might sound horribly complex, but its simply an electric circuit with two inputs and an output. It receives two incoming electric currents, compares them, and sends on a new, outgoing electric current depending on what it finds. A logic gate is a bit like a doorman or bouncer who is allowed to let people into a nightclub only if they pass certain tests. There are quite a few different types of logic gate, the most common of which are called AND, OR, NOT, XOR (Exclusive Or), NAND (NOT AND), and NOR (NOT OR). To convert a logic circuit to a hypergraph, the following map is used. Each literal in the logic circuit maps to one vertex in the hypergraph. Each clause maps a hyperedge and connects to the vertices that correspond to the literals in the clause. Therefore, for any given logic circuit, a hypergraph and a Boolean expression can be obtained.
Discussion of conclusion and future works
For any given finite set, there are some clustering sets, and by each cluster set, a decision can be made. Sometimes we have to make a cluster set by binary codes, so some irregular subsets with non-empty intersections are obtained. We need to give an order to the information, so apply the concept of hypergraphs. We correspond any information to a Boolean literal and give in a hyperedge, so we have a hypergraph. Based on this hypergraph, we generate a T.B.T and the values 0, 1 are placed in rows and columns. Now we can generate a Boolean expression in any way and apply it to our aims(for instance from D.N.F). However, we need to generate a minimum Boolean expression which is an irreducible Boolean expression(which D.N.F has a limitation in this regard). Since disjunctive normal forms are reducible Boolean expressions, we need to make another way in generating of Boolean expressions. The non-empty intersections in hyperedges of hypergraphs help to generate minimum Boolean expressions from T.B.T in such a way that are irreducible Boolean expressions and are not same to D.N.F necessarily. To egularify access to obtain the minimum Boolean expressions, we introduce an Algorithm and so Python programming which compute irreducible Boolean expressions. There are some advantages based on the results of this paper including defining and considerning the notion of hypergraphs based on Boolean functions, hypergraphable Boolean functions and Boolean functionable hypergraphs. Moreover, it is demonstrated that:
Each Boolean function, is a hyperdiagramable Boolean function.
Every hypergraph is a Boolean functionable hypergraph.
Every T.B.T corresponds to a Boolean expression.
Every T.B.T corresponds to a minimum Boolean expression.
The concept of Boolean function–based hypergraph is introduced and will be denoted by . Moreover, it is demonstrated that if is an 0-intersection hypergraph, then the T.B.T corresponds to an irreducible d.n.f.
These result might be helpful for further studies in Boolean function theory. In our future research there is an inclination for obtaining more findings with regard to irreducible Boolean function, graphs, hypergraphs, decision tree based on Boolean function–based hypergraph and their applications.
Compliance with ethical standards
Conflict of interest
The authors declare that they have no conflict of interest.
References
1.
AkramM. and LuqmanA., Certain networks models using single-valued neutrosophic directed hypergraphs, Journal of Intelligent & Fuzzy Systems33 (2017), 575–588.
2.
BergeC., North Holland, Graphs and Hypergraphs (1979).
3.
EldonJ., Whitesitt, Boolean Algebra and Its Applications, New York Dover Publications Inc (1995).
4.
HamidiM. and BorumandsaiedA., Accessible single-valued neutrosophic graphs, J Appl Math Comput57 (2018), 121–146.
5.
HamidiM. and BorumandsaiedA., Achievable Single-Valued Neutrosophic Graphs in Wireless Sensor Networks, New Mathematics and Natural Computation14(2) (2018), 157–185.
6.
HamidiM. and Borumand SaeidA., On Derivable Trees, Transactions on Combinatorics8(2) (2019), 21–43.
7.
HamidiM. and SmarandacheF., Single-Valued Neutrosophic Directed (Hyper)Graphs And Applications in Networks, Journal of Intelligent & Fuzzy Systems37(2) (2019), 2869–2885.
8.
MolnarB., Applications of Hypergraphs in Informatics a Survey and Opportunities for Research, Annales Univ Sci Budapest Sect Comp42 (2014), 261–282.
9.
PoulikS. and GhoraiG., Detour g-interior nodes and detour g-boundary nodes in bipolar fuzzy graph with applications, Hacettepe University Bulletin of Natural Sciences and Engineering Series B: Mathematics and Statistics49(1) (2020), 106–119.
10.
PoulikS. and GhoraiG., Certain indices of graphs under bipolar fuzzy environment with applications, Soft Computing24(7) (2020), 5119–5131.
11.
PoulikS. and GhoraiG., Note on Bipolar fuzzy graphs with applications, Knowledge-Based Systems192 (2020), 1–5.