For n=4 , what is the total number of possible logical expressions?

Joined Nov 6, 2019
16
For n=4 , what is the total number of possible logical expressions? Competitive exam questions which I'm working out these days. Sorry for silly questions.

dl324

Joined Mar 30, 2015
12,258

Papabravo

Joined Feb 24, 2006
14,869
Are we talking Boolean Algebra, where n is the number of Boolean variables? Is so you should be able to count the number of expressions on the total number of fingers and toes possessed by a normal human person.

WBahn

Joined Mar 31, 2012
26,398
For n=4 , what is the total number of possible logical expressions? Competitive exam questions which I'm working out these days. Sorry for silly questions.
What does n represent?

djsfantasi

Joined Apr 11, 2010
7,230
And where has your work led you? Since this is Homework Help, we need to know how you’ve approached the problem thus far...

RBR1317

Joined Nov 13, 2010
593
number of possible logical expressions?
So what is meant by "logical expression"? If you have a logic function in canonical form expressed as a sum of minterms or as a product of maxterms, would that be considered one logical expression or two?

Joined Nov 6, 2019
16
Hi, This is based on basic Boolean/Digital Electronics Basics. The answer is 2^2^n is the generalised equation to find the answer.

Attachments

• 141.1 KB Views: 6

Joined Nov 6, 2019
16
Are we talking Boolean Algebra, where n is the number of Boolean variables? Is so you should be able to count the number of expressions on the total number of fingers and toes possessed by a normal human person.
Yes, we are talking about basic Boolean operations/ Basic Digital Electronics. The equation to find the answer is 2^2^n. Thanks for the reply.

Joined Nov 6, 2019
16
What does n represent?

We are talking about basic boolean operations/Basic Digital electronics. We have 4 variables, let's say A,B,C and D. We need to find total number of logical expression possible those 4 variables.

Unfortunately, in my exam no one mind to elaborate the questions like this. All they say is this exam is based on Electronics. You need to find the answer.

Attachments

• 142.4 KB Views: 0

Joined Nov 6, 2019
16
And where has your work led you? Since this is Homework Help, we need to know how you’ve approached the problem thus far...
Hi Sir, This is related to Digital Electronics/Boolean Algebra. Question is we have 4 Boolean variables and we need to find maximum number of Logical expression possible for those 4 variables. Kindly post your answer+ the way of thinking. Thank You!

Joined Nov 6, 2019
16
So what is meant by "logical expression"? If you have a logic function in canonical form expressed as a sum of minterms or as a product of maxterms, would that be considered one logical expression or two?
The question is we have 4 Logical variables, and we need to find maximum number possible local expressions for that.

I've got the same doubt. I even had that confusion, still I'm not that clear on the answer, even I have complete tutorial with me. attaching a screen shot.

Attachments

• 142.4 KB Views: 4

WBahn

Joined Mar 31, 2012
26,398
Do you understand where that 2^2^n comes from? Also, do you understand whether it's (2^2)^n or 2^(2^n)?

ci139

Joined Jul 11, 2016
1,696
i find this question of your's confusing as on the uploaded black-board shot !! ← namely , it does NOT make any sense at all !!

but i guess i copy where the question aims

A B = Y(A,B) ?the total number of unique sets(X₀,X₂,X₂,X₃)*
0 0 - X₀
0 1 - X₁
1 0 - X₂
1 1 - X₃

as far as i can get -- you can form a "static" output from 2 arguments , and
the Q(n) = combinations of 2ⁿ by pairs = (2ⁿ)!/((2ⁿ-2)!(2!)) ← but it must be ordered so the correct formula differs (maybe) . . . must verify ← but somewhat so
or the n it's the number of variations* 2^(2ⁿ) /// but still what they write on the blackboard is a hoax -- is because the presented data won't hint to a systematic rule that can be applied to voluntary n

note : Q(n) = combinations of 2ⁿ by pairs = (2ⁿ)!/((2ⁿ-2)!(2!)) -- i saw this leads to an answer but now it's kind of misty . . . attempting to restore the involved thought pattern . . . each X has 2 possible values , there are 2ⁿ results in function map (each having the 2 possible values) . . . would actually tell us how many combinations the m 1-s or w 0-s would be in the result space . . . so correction Q(n) = Σ,k[0,2ⁿ],(2ⁿ)!/((2ⁿ-k)!(k!)) =
= 1·2·3·4/((1·2·3·4)·(1)) + 1·2·3·4/((1·2·3)·(1)) + 1·2·3·4/((1·2)·(1·2)) + 1·2·3·4/((1)·(1·2·3)) + 1·2·3·4/((1)·(1·2·3·4)) = 2·(1 + 4) + 6 = 16
. . .
checking for n=1 & n=0
Σ(0 to 2) = = 1·2/((1·2)·(1)) + 1·2/((1)·(1)) + 1·2/((1)(1·2)) = 2·1+ 2 = 4
Σ(0 to 1) = = 1/((1)·(1)) + 1/((1)·(1)) = 2·1 = 2 -- the function of no arguments can have 2 distinct values
. . .
to check identity to 2^2ⁿ paste code below to
JS.do Online JavaScript Editor
// a 1 way to select it is to go to the end of </script> ← backward select (an ending part of) it (or few lines from below)
// then roll the screen upward (with the mouse-wheel --and/or-- V-scroll Bar)
// --and-- holding down the Shift K - Lf-click at the beginning of →|<script> ← or click-darg the selection from the middle of it to/over the Left < bracket
Code:
<script>
var n,nn,k,r,ss,jsLF=String.fromCharCode(10)
ss="Enter the number of  arguments N for boolean function for Y(x1,...,xN)?"
for(var i=0;i<2;i++){ss+=jsLF}
ss+="(! note that for the argument counts > 5 the results will be approximate !)"
function jsMain()
n = nn = Number(prompt("? N ="))
r=0
k=Math.floor(Math.pow(2,n)+.25)
for(var i=0;i<=k;i++){r+=jsFact(k)/(jsFact(k-i)*jsFact(i))}
alert("For the function Y("+jsArgList(n)+") with "+String(n)+" arguments exists "+String(r)+" distinct forms")
}
function jsFact(a)
{ var u,c,t;
t=1/2
a=Math.floor(Math.abs(a)+.25)
a++; a+=t; a-=t; c=t; u=c; t+=t; c+=c; u+=u; //alert("t="+String(t)+jsLF+"c="+String(c)+jsLF+"u="+String(u))
for(var j=1;j<a;j++){t*=c; c+=u}
return t
}
function jsArgList(n)
{ var s="";
n=Math.floor(Math.abs(n)+1.25)
for(var j=1;j<n;j++){s+=String.fromCharCode(j+64)+","}
s=s.substr(0,s.length-1)
return s
}
document.onclick = jsMain
document.write("Click to Go!")
</script>

Last edited: