Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
1 answer
156 views

Given a truth table, maybe 3-vars, 5-vars or even 10-vars, i can write its formula in DNF or CNF, and simplify it using K-Map or Quine-McCluskey algorithm. But it is based on {NOT, AND, OR}. Now the ...
1 vote
1 answer
78 views

I am trying to implement a post-order propositional calculator using a binary tree in a recursive fashion. T represents True, F false, N not, A and, and O or. I tried running the code with GDB, but ...
0 votes
0 answers
48 views

There are certain premises which I am unable to represent correctly in prolog, which are as follows: "I can only sleep well if I am neither in a noisy environment nor have caffeine before ...
0 votes
1 answer
167 views

Let C(x) be the statement "x has a cat," let D(x) be the statement "x has a dog," let F(x) be the statement "x has a ferret." Express each of these statements in terms of C(x), D(x), F(x), quantifiers,...
-6 votes
1 answer
254 views

I'd like to create an algorithm that takes as input a propositional logic expression without parentheses and outputs the same expression enclosed in parentheses in all possible ways depending on the ...
0 votes
2 answers
110 views

I am working on a Sat project, one of my subtasks is to compute the max of a list of a vectors of boolean, each of them is a number. An example of the vector is [False,True,True,False], it represents ...
0 votes
1 answer
238 views

I have just started reading into propositional calculus/logic, and have realised that a lot of the foundational concepts in this area are similar to those encountered in programming. That is, ...
0 votes
0 answers
89 views

I have been working on this project and came to this trouble on the process of obtaining the parts of the formula for a separate evaluation. Like for example: (~p>~q)^(~(p^q)) I should get: (~p) (~...
2 votes
1 answer
511 views

I'm new to Prolog and have some doubts. I need to write a function form_equiv(A,B) that tells us if if B is equivalent to A where A and B are supposed to be propositions. I know that two propositions ...
0 votes
2 answers
116 views

I have some dictionary e.g. of form: my_dictionary = {'A': '¬(p)', 'B': '→(q, ∧(¬(p), ∨(y, z)))', 'Aim': ['p', '→(p, q)']} Is their a simple way to replace all strings appearing in the dictionary ...
1 vote
3 answers
80 views

I have an list of strings which illustrate propositions. E.g. L = ['(A∧B)', 'A', 'B'] My aim is to join each element with the string '∧' and brackets "()", which results in following string:...
2 votes
2 answers
110 views

Sorry for overcomplicated example. I have Lemma test : forall x y z : Prop, ( (((x → (y ∨ z)) → (x ∨ y)) ↔ (x ∨ y)) ∧ (((y → (x ∨ z)) → (x ∨ y)) ↔ (x ∨ y)) ∧ ((y → (x ∨ z)) → (x ∨ (x → (y ...
-1 votes
1 answer
199 views

a) Determine whether the following statement forms are logically equivalent: p -> (q -> r) and (p -> q) -> r b) Use the logical equivalence established in part (a) to rewrite the ...
0 votes
1 answer
176 views

While going through online resources, I have noticed that satisfiability is taken differently. Sometimes resources ask for showing that a given proposition is satisfiable or not? However, sometimes ...
-2 votes
1 answer
159 views

I need to convert the following propositions into prolog code and I have do not understand how the operators work. I usually use java. "Jeans are only casual, dress pants are only formal, kakis ...

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /