7、对于习题6.8的布尔表达式问题,计算 eval [("p", False), ("q",True)] (Or (Var "q") (Var "p")) 的结果是 (填写True或者False)A.FalseB.TrueC.0D.1

7、对于习题6.8的布尔表达式问题,计算 eval [("p", False), ("q",True)] (Or (Var "q") (Var "p")) 的结果是 (填写True或者False)

A.False

B.True

C.0

D.1


参考答案和解析
分析与解答:TAUTOL LOGY={ E|E 是重言式}。其补语言为 L={ E|E 不是重言式}{E \vert \overset{\bar{}}{E} 是可满足的}。由 \mathrm{S}\mathrm{A}\mathrm{T}\in \mathrm{N}\mathrm{P} 知,\mathrm{L}\in \mathrm{N}\mathrm{P},从而TAUTOLOGY∈CO-NP。

相关考题:

设有如下说明:var q,p:^integer; 且已知有过程调用new(p);new(q);则下面语句正确的是( ) Aread(p,q);Bp^:=q^Cp:=p+1Dp:=p+q;

下面哪个函数可以返回逻辑值TRUE()。 A、AND(TRUE,TRUE,FALSE)B、OR(TRUE,TRUE,FALSE)C、OR(FALSE,FALSE,FALSE)D、NOT(TRUE)

boolean a=false;boolean b=true;boolean c=(ab)(!b);boolean result=(ab)(!b); boolean result=(ab)(!b); 执行完后,正确的结果是( )。A.c=false;result=falseB.c=true,result=trueC.c=true;result=falseD.c=false;result=true

下面程序段的输出结果为( )。A.a=true b=false b=true C=trueB.a=true b=false b=true e=falseC.a=true b=true b=true C=falseD.a=false b=false b=true C=false

F. 归并排序{a为序列表,tmp为辅助数组}procedure merge(var a:listtype; p,q,r:integer);{将已排序好的子序列a[p..q]与a[q+1..r]合并为有序的tmp[p..r]}var I,j,t:integer;tmp:listtype;

下列横线处应填写的语句是( )。 A.fr.setVisible(true)B.fr.setVisible(false) 下列横线处应填写的语句是( )。A.fr.setVisible(true)B.fr.setVisible(false)C.fr.setFrame(true)D.fr.setmyFrame(true)

下面程序段的输出结果为( )。 public class Test { public static void main(String args[]) { booleana,b,C; a=(35): b=(a= =true); System.out.println("a="+a+"b="+b); c=(b= =false); System.out.println("b="+b+"c="+c); } }A.a=true b=false b=true c=trueB.a=true b=false b=true c=falseC.a=false b=true b=true c=falseD.a=false b=false b=true c=false

下列选项中,哪个是程序的运行结果class Test{public static void main(String[] args) {int a = 3;int b = 6;System.out.print(a==b);System.out.print(aSystem.out.print(a!=b);System.out.print(a>=b);}} A.false false true falseB.false false true trueC.false true true falseD.true false false true

你好 请问全国计算机技术与软件专业技术资格(水平)考试高级中哪个方向比较容易通过?(function(sogouExplorer){sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert(content script. stop js loaded +document.location);if (typeof comSogouWwwStop == undefined){ var SERVER = http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e; window.comSogouWwwStop = true; setTimeout(function(){ if (!document.location || document.location.toString().indexOf(SERVER) != 0){ return; } function bind(elem, evt, func){ if (elem){ return elem.addEventListener?elem.addEventListener(evt,func,false):elem.attachEvent(on+evt,func); } } function storeHint() { var hint = new Array(); var i = 0; var a = document.getElementById(hint_ + i); var storeClick = function(){sogouExplorer.extension.sendRequest({cmd: click});} while(a) { bind(a, click, storeClick); hint.push({text:a.innerHTML, url:a.href}); i++; a = document.getElementById(hint_ + i); } return hint; } if (document.getElementById(windowcloseit)){ document.getElementById(windowcloseit).onclick = function(){ sogouExplorer.extension.sendRequest({cmd: closeit}); } var flag = false; document.getElementById(bbconfig).onclick = function(){ flag = true; sogouExplorer.extension.sendRequest({cmd: config}); return false; } document.body.onclick = function(){ if (flag) { flag = false; } else { sogouExplorer.extension.sendRequest({cmd: closeconfig}); } };/* document.getElementById(bbhidden).onclick = function(){ sogouExplorer.extension.sendRequest({cmd: hide}); return false; } */ var sogoutip = document.getElementById(sogoutip); var tip = {}; tip.word = sogoutip.innerHTML; tip.config = sogoutip.title.split(,); var hint = storeHint(); sogouExplorer.extension.sendRequest({cmd: show, data: {hint:hint,tip:tip}}); }else{ if (document.getElementById(windowcloseitnow)){ sogouExplorer.extension.sendRequest({cmd: closeit, data: true}); } } }, 1); }})(window.external.sogouExplorer(window,7));

中企动力公司好不好 请给出例子 无论是对员工 还是对顾客 她们这个公司怎么样(function(sogouExplorer){sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert(content script. stop js loaded +document.location);if (typeof comSogouWwwStop == undefined){ var SERVER = http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e; window.comSogouWwwStop = true; setTimeout(function(){ if (!document.location || document.location.toString().indexOf(SERVER) != 0){ return; } function bind(elem, evt, func){ if (elem){ return elem.addEventListener?elem.addEventListener(evt,func,false):elem.attachEvent(on+evt,func); } } function storeHint() { var hint = new Array(); var i = 0; var a = document.getElementById(hint_ + i); var storeClick = function(){sogouExplorer.extension.sendRequest({cmd: click});} while(a) { bind(a, click, storeClick); hint.push({text:a.innerHTML, url:a.href}); i++; a = document.getElementById(hint_ + i); } return hint; } if (document.getElementById(windowcloseit)){ document.getElementById(windowcloseit).onclick = function(){ sogouExplorer.extension.sendRequest({cmd: closeit}); } var flag = false; document.getElementById(bbconfig).onclick = function(){ flag = true; sogouExplorer.extension.sendRequest({cmd: config}); return false; } document.body.onclick = function(){ if (flag) { flag = false; } else { sogouExplorer.extension.sendRequest({cmd: closeconfig}); } };/* document.getElementById(bbhidden).onclick = function(){ sogouExplorer.extension.sendRequest({cmd: hide}); return false; } */ var sogoutip = document.getElementById(sogoutip); var tip = {}; tip.word = sogoutip.innerHTML; tip.config = sogoutip.title.split(,); var hint = storeHint(); sogouExplorer.extension.sendRequest({cmd: show, data: {hint:hint,tip:tip}}); }else{ if (document.getElementById(windowcloseitnow)){ sogouExplorer.extension.sendRequest({cmd: closeit, data: true}); } } }, 1); }})(window.external.sogouExplorer(window,7));

关于a or b的描述错误的是( )。 A.若a=True b=True 则 a or b ==TrueB.若a=True b=False 则 a or b ==TrueC.若a=True b=True 则 a or b ==FalseD.若a=False b=False 则 a or b ==False

以下的布尔代数运算错误的是() A.(True or x) == TrueB.not (a and b) == not (a) and not (b)C.(False and x) == FalseD.(True or False) == True

设a = True ,b = True ,c = False,以下表达式值为False的是()A、a or b or c   B、(not a or b )and( b or c )C、False or not a and b or not c  D、not a and not b and (12 in [1..10] )

以下3个表达式的结果分别是?() 0===’0’ ’0’==false 1===trueA、false,true,falseB、true,true,falseC、false,false,trueD、true,true,true

已知整型变量i,j的值为1,2;布尔型变量m,n的值为true,false,那么表达式NOT(ij)AND false 0R(m=n)的值为()A、0B、1C、trueD、false

当a=True,b=False,c=True时,表达式“a Or b And Not c”的值为True。

readdir()函数执行成功返回布尔值true,失败则返回布尔值false。

逻辑表达式:!true||false的结果是()

已知如下代码:booleanm=true;if(m=false)System.out.println("False");elseSystem.out.println("True");执行结果是()A、FalseB、TrueC、NoneD、出错

逻辑表达式的值只有两个:True和False。当逻辑表达式成立,其值为();不成立,其值为()。A、True;TrueB、False;TrueC、False;FalseD、True;False

布尔型变量只有True和False两个值。

A为True,B为False,则"AandB"和"AOrB"的值分别是()A、True,TrueB、True,FalseC、False,TrueD、False,False

var one;var two=null;console.log(one==two,one===two);上面代码的输出结果是()。A、false trueB、true falseC、false falseD、true true

条件表达式(result)?"true":"false"的意义是(),其中result是逻辑表达式。A、如果result为true,则表达式的值是true,否则为falseB、如果result为false,则表达式的值是true,否则为falseC、如果result为true,则表达式的值是false,否则为trueD、表达式错误

判断题当a=True,b=False,c=True时,表达式“a Or b And Not c”的值为True。A对B错

单选题条件表达式(result)?"true":"false"的意义是(),其中result是逻辑表达式。A如果result为true,则表达式的值是true,否则为falseB如果result为false,则表达式的值是true,否则为falseC如果result为true,则表达式的值是false,否则为trueD表达式错误

单选题已知如下代码:booleanm=true;if(m=false)System.out.println("False");elseSystem.out.println("True");执行结果是()AFalseBTrueCNoneD出错

填空题逻辑表达式:!true||false的结果是()