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>

LennonCook 03-24-2003 06:40 PM

Quote:

Originally posted by Gammit:
This is a proposition, not a question... and it's not even real psuedocode.
<font color="lightblue">But it is a question about how to read the pseudocode. ;) </font>

antryg 03-24-2003 06:44 PM

Actually, I thought the logical sequence would be Uncle (James, Joe)

Tobbin 03-24-2003 07:07 PM

Quote:

Originally posted by LennonCook:
</font><blockquote>Quote:</font><hr />Originally posted by Gammit:
This is a proposition, not a question... and it's not even real psuedocode.

<font color="lightblue">But it is a question about how to read the pseudocode. ;) </font></font>[/QUOTE]When you write pseudocode, you can't think like a programmer. You have to think more like an English major. You should write it so that there is no question what is meant with the statement. The programmer will be coding the program from the pseudocode. A lot of what you are putting in the statement would be explained somewhere in the beginning or at the end though. Most variables should be defined somewhere. It's just hard to say how the pseudocode should be written without this information.

TheCrimsomBlade 03-24-2003 07:57 PM

Thats it, I'm going to turn on the T.V. and watch 4 hrs of Stargate SG-1 just to make my eye balls stop spinning around!

Earthdog 04-01-2003 02:19 AM

I think we're left with the question of: Who really knocked mom up and whos the real Father/Uncle :D

pcgiant 04-01-2003 02:48 AM

Bob's my uncle.


All times are GMT -4. The time now is 01:07 AM.

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