342 Answered Questions for the topic logic

Logic Math Xor Boolean


What does Exclusive in XOR really mean?

Maybe this is just obvious to everyone but can someone explain where XOR (or Exclusive-OR) got its name from? What does the word ***Exclusive*** really mean? Not that it matters, but its just stuck... more


Intro to Logic- Use Natural Deduction to prove Dist E

Hi everyone, Can someone please help me. I have to use natural deduction to prove Dist E for both 'or' and 'and'These are the two questions: 1: Dist E-Ex(Px v Qx) premiseConclusion: ExPx v ExQx2:... more


Why can't humans believe contradictions?

I'm reading something on the topic of **logic** and one of the exercises asked me to convince myself that a contradictory statement was true. I could not convince myself of this and now I am... more


Are || and ! operators sufficient to make every possible logical expression?

The logical expression `( a && b )` *(both `a` and `b` have boolean values)* can be written like `!(!a || !b)`, for example. Doesn't this mean that `&&` is "unneccesary"? Does this... more


How to perform an action every 5 results?

How can I perform an action within a `for` loop every 5 results? Basically I'm just trying to emulate a table with 5 columns.

Can a lack of knowledge or understanding invalidate a positive claim?

Consider the **example** of causal determinism. It can be phrased in many ways, all with identical meaning:<br /> - The idea that "every event, including human cognition and behavior,... more

Predicate vs Functions in First order logic?

I have been so confused lately regarding difference between predicate and function in first order logic. My understanding so far is, Predicate is to show a comparison or showing a relation... more
Logic C# .net


C# & operator clarification?

I saw a couple of questions here about the diference between && and & operators in C#, but I am still confused how it is used, and what outcome results in different situations. For... more
Logic Algorithm


What is the logic for solving this sequence?

The sequence goes like this.. `7,8,77,78,87,88,777,778,787,788` and so on.. What can be the logic for finding the nth number of the sequence? I tried that by dividing it by 2 and then by 4 and... more


Most efficient/elegant way to clip a number?

Given a real (n), a maximum value this real can be (upper), and a minimum value this real can be (lower), how can we most efficiently clip n, such that it remains between lower and upper? Of... more


Please answer it as quick as possible🙏🙏

A number when successively divided by 6,5 & 3 leaves remainders of 4,4 and 2. Find the number.


Why does javascript accept commas in if statements?

I stumbled across some javascript syntax that seemed like it should produce a parse error of some kind but doesn't: if (true, true) {console.log('splendid')} else {console.log('horrid')} //... more


Why are default arguments evaluated at definition time in Python?

I had a very difficult time with understanding the root cause of a problem in an algorithm. Then, by simplifying the functions step by step I found out that evaluation of default arguments in... more
Logic Calculus


Coloring Maps (Critical Thinking, Four Color Theorem)

When coloring a map of countries, we want to give countries different colors if they are touching each other. (If they are only touching at a single point, that doesn’t count.) • Draw a map that... more


Use both the direct and indirect truth-table to show whether the above argument is valid.

Symbolize the following argument using the symbols for simple statements and logical operators discussed in chapter 6. If it is not the case that humans have free-will then God is to blame for the... more


Logical fallacy: X is bad, Y is worse, thus X is not bad?

I have heard this type of argument too many times: You are criticising X using well researched facts and arguments. Your interlocutor, states that Y is much worse with equally well researched facts... more

Incrementor logic?

I'm trying to get deeper with post and pre incrementors but am a bit stuck with the following expression : public static void main(String[] args) { int i = 0; i = i+=(++i + (i+=2 + --i) -... more
Logic Geometry


a ring of squares

A ring of N squares, the N is a multiple of 3."K" squares in the ring are painted of white, and the other squares are painted black. We have a SWITCH operator, that turns the color of 3 adjacent... more
Logic Philosophy


Can you provide an example of solving a proof in Predicate Logic?

∃x(Gx • Px) ∨ ∃x(Sx • Ex). ∼∃x(Ex) ∴∃x(Px)

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.