Questions tagged [truthtable]

A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their logical variables.

In particular, truth tables can be used to tell whether a propositional expression is true for all legitimate input values, that is, logically valid.

Practically, a truth table is composed of one column for each input variable (for example, A and B), and one final column for all of the possible results of the logical operation that the table is meant to represent (for example, A XOR B). Each row of the truth table therefore contains one possible configuration of the input variables (for instance, A=true B=false), and the result of the operation for those values.

210 questions
0
votes
1 answer

truth table in 2D arry

Below, you'll see how I am building my truth table. //Tab 2D represents truth table //tt [nbr of combinaisons] [nbr of variables + S] boolean tt [][] = new boolean [nbrCombinaisons][nbrVariables+1]; for (int j = 0; j < nbrVariables;…
user7110366
0
votes
1 answer

Passing a vector as the times argument to rep in R

I'm creating the input structure of binary truth tables for a Boolean network modeling project. Each node in the network of size n may have a different number of inputs k, resulting in truth tables of varying dimensions. I'm using the following bit…
pelzma
  • 1
0
votes
2 answers

Deriving a contingency truth table from two columns with yes and no values in R

I've been trying to manipulate my data in R to something similar here How to Find False Positive Prediction Count using R Script , but difficult doing it owing to lack of minimal example. My dataframe (called info) is like this: obs sim no no no…
Chike
  • 21
  • 1
0
votes
1 answer

Boolean Logic and Truth Tables

I have been Googling around and haven't been able to find a solution. If anyone can link me or explain this, I'd appreciate it. I have this expression: ¬aΛb | aΛ¬b. Λ is AND, ¬ is NOT. The truth table is: A B Expression -------------- T T F T F…
nc052
  • 47
  • 5
0
votes
3 answers

Truth table to prove an argument true/false

Can someone help me out with truth tables? I would like to create a truth table to prove whether or not this is true.
0
votes
0 answers

truth table for the car in the box puzzle

I have generated the following truth table for the following logic puzzle: https://brilliant.org/problems/from-signup/the-boxes/no-group/no-input/?signedup=true#= It is for the car in the box problem, explained below: here are 3 boxes, exactly one…
Compoot
  • 2,227
  • 6
  • 31
  • 63
0
votes
1 answer

Javascript: form validation with a∨(b∧c∧d)

There is proberly a simple answer to this and a more elegant than i have. I have a login form in html. You can login with your ID or your Firstname, Lastname and email. In JS i want to validate the form, i want to see if the ID field is filled or…
CodingWookiee
  • 50
  • 1
  • 8
0
votes
1 answer

need a conditional statement for desired output

I need to write a conditional tatement in IF class by using three variable to get some desired output, i have tried many logics with that three variable to get the desired output which i can use in if class but i couldn't succeed, hope anyone can…
0
votes
1 answer

Is SOP equal to the negation of POS of the same truth table?

Is the Sum Of Product equal to the negation of Product Of Sum of the same truth table?
Dean Johns
  • 498
  • 4
  • 28
0
votes
1 answer

Change columns orders in Multidimensional Array

Im building a Truth Table Generator, and to be able to get all the possible values for each column i started with the first one(False, True, False, True, etc.), then the next(false, false, true, true, etc.). Now my table looks like this: False …
user7056422
0
votes
1 answer

9's complement of a 4-bit binary number

I don't understand how to calculate the 9's complement of a binary number. I can apply it to decimal ones, example 15 = (9-1)(9-5) ) 84 then I thought to proceed with a binary -> decimal -> 9's complement -> binary conversion but I guess it's not…
user3595871
  • 1
  • 1
  • 1
  • 3
0
votes
1 answer

Rest Search Parameters Validation

I have a rest end point that takes the urls with the following 3 parameters as valid: regno, hostid, location regno, domid, location regno, provider Anything other than these combinations are invalid. I have a validator method that checks this if…
Raskill
  • 175
  • 13
0
votes
0 answers

How do I fix the following error code: Error in `$<-.data.frame`(`*tmp*`, "cases", value =

When I give the following code: ttE1B <- truthTable(data=O4S2, outcome = "FSUMSUST", conditions = "CSUSCOM, CESGCOMP, FWOM, CENERGY, CMAT, CINDUST, CCDISC, CFINSECT, CENVSPOL, CTELE, CUTIL, CGRBLDGPOL, CSPKGPOL, FTOTPOL, CGRI, CUN, FESGD, FSOCD,…
0
votes
0 answers

Evaluate logical expression in postfix/rpn form

I have some variables var a = true; var b = false; var c = true; and propositional logic expression (in infix=a | b & c) as postfix a b | c & I want to evaluate the truth value. I have found…
Jamgreen
  • 10,329
  • 29
  • 113
  • 224
0
votes
1 answer

Create a truth table of results in an excel formula

Based on two input conditions, I wish to be able to output 1 of 4 output values. For example when checking for matches between two tables I would like to be able to access a function…
Mark
  • 73
  • 7