A Problem in Logic (42)

1 Name: #!/usr/bin/anonymous : 2008-05-04 03:29 ID:MuJs/AX1

I need some help with a simple problem involving the basic logical operators: AND, OR, and NOT, along with the relational operator EQUAL TO, and truth values TRUE and FALSE.

Let's assume that we have a function tD() that tests whether 3 integers are all different. So, tD( 1, 2, 2 ) will return FALSE, and tD( 6, 6, 6 ) will return TRUE.

Now, my problem is to define a function the uses the above to determine whether or not 4 integers are equal. Let's call it

bool fE( a, b, c, d )

defined completely in terms of

bool tD( a, b, c) 

and the aforementioned operators.

you can write in any code you prefer.

This thread has been closed. You cannot post in this thread any longer.