![]() |
<font color="lightblue">If Brother(John,Jack) and Father(Jack,James)
Then, Father(John,James) or Uncle(John,James) ?? </font> |
Scant question. If Im reading this right you need a Do While statement. It'd help if I had the rest of the equation.
|
just when I thought I had seen every weird thread on Ironworks possible...
|
Quote:
If Brother(Jack,John) And Father(Jack,James) are both true then, which of these would logically follow: Father(John,James) or Uncle(John,James)</font> |
Quote:
|
There is no answer to this question.
If Father(jack, james) = true, does that indicate that jack is james father, or the reverse? There is no formal standard for this. My inclination would be towards the former, but thats down to programmer style. |
Quote:
If Brother(Jack,John) And Father(Jack,James) are both true then, which of these would logically follow: Father(John,James) or Uncle(John,James)</font></font>[/QUOTE]This is not a clearly thought out statement. You have two different variables from 2 different groups. It depends on how you program the relation. It sounds like Brother(Jack,John) and Father(Jack,James) are asking about 2 different people in a relationship that could possibly be the same person if viewed from 2 different perspectives. IE My brother is your father, which would make me your uncle. Is that what you are looking for? If that is the case: If Brother(John,James) & Father(Jack,James) Then Subvariable(unspecified)=Uncle(defined) ;Uncle(John,James) Else Subvariable(unspecified)=Uncle(undefined) ; Not = Uncle(John,James) [ 03-24-2003, 08:51 AM: Message edited by: Tobbin ] |
This is a proposition, not a question... and it's not even real psuedocode. You would first have to define the Brother(x,y), Father(x,y), and Uncle(x,y) {x and y are nondistinct people} functions. Then after picking one or the other conclusions, you would have either a True statement of a False statement. To make it pseudocode, you'd need a "while," "for," "do," "begin," etc. statement.
Grossman, Jerold W. Discrete Mathematics: An Introduction to Concepts, Methods, and Applications. Macmillan Publishing Company. New York. 1990. Chapters 1 & 4. P.S. yes, this is the same pseudocode used in computer applications |
Depending on what level of effect the undefined variables would affect, an if statement could work as well. This is a valid pseudocode operator as not all equations need a loop effect. The loop effect can be placed around the if statement if a re-iteration were needed. Should there be more than 3 outcomes though, another form of loop would make more sense. Possibly a case statement.
|
Quote:
|
All times are GMT -4. The time now is 10:38 PM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved