Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   General Conversation Archives (11/2000 - 01/2005) (http://www.ironworksforum.com/forum/forumdisplay.php?f=28)
-   -   Question re Pseudo Code (http://www.ironworksforum.com/forum/showthread.php?t=84865)

LennonCook 03-24-2003 04:22 AM

<font color="lightblue">If Brother(John,Jack) and Father(Jack,James)
Then,
Father(John,James) or Uncle(John,James) ?? </font>

Earthdog 03-24-2003 04:27 AM

Scant question. If Im reading this right you need a Do While statement. It'd help if I had the rest of the equation.

Jorath Calar 03-24-2003 04:36 AM

just when I thought I had seen every weird thread on Ironworks possible...

LennonCook 03-24-2003 05:26 AM

Quote:

Originally posted by Earthdog:
Scant question. If Im reading this right you need a Do While statement. It'd help if I had the rest of the equation.
<font color="lightblue">Allow me to rephrase,
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>

LennonCook 03-24-2003 05:28 AM

Quote:

Originally posted by Jorath Calar:
just when I thought I had seen every weird thread on Ironworks possible...
<font color="lightblue">What happened, I wonder ?? Ohh... ;)j/k. </font>

andrewas 03-24-2003 07:27 AM

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.

Tobbin 03-24-2003 08:47 AM

Quote:

Originally posted by LennonCook:
</font><blockquote>Quote:</font><hr />Originally posted by Earthdog:
Scant question. If Im reading this right you need a Do While statement. It'd help if I had the rest of the equation.

<font color="lightblue">Allow me to rephrase,
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 ]

Gammit 03-24-2003 03:58 PM

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

Tobbin 03-24-2003 04:18 PM

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.

LennonCook 03-24-2003 06:37 PM

Quote:

Originally posted by andrewas:
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.

<font color="lightblue">So, basically, without more information, either could be true ??</font>


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