Results 1 to 10 of 10

Thread: [RESOLVED] Little help with formula pseudocode

  1. #1

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Resolved [RESOLVED] Little help with formula pseudocode

    hello guys,

    I've got the following formula (see attached img),

    this is the first time ive encountered such mathematical symbol and i cnt seem to understand it >.<

    Here is what i fot of it so far:

    R is equal the set union of Ri where Ri contains the same elements of Rj and is not equal to 0? am i right on this 1?

    im a bit stuck on trying to develop a pseudocode for this as i havent encounter such symbol. any sugestion on this is truly appreciated...
    Attached Images Attached Images  
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Little help with formula pseudocode

    You've interpreted the first one correctly, though I find it a little strange that someone would use S as the upper limit of numeric unions. *meh*
    As you've said, it's the union of a bunch of subsets--that is, R is the set of all elements that occur in any Ri.

    The second two statements should more properly be written

    Ri {intersection symbol} Rj = {empty set symbol} for all i != j.

    Your interpretation of this ("Ri contains the same elements of Rj and is not equal to 0") seems to be inverted. What this is saying is that, when you consider the intersection of any two different Rn's, you get the empty set. What is the intersection of two sets? The intersection is the set of all elements that occur in both of the original sets. Thus when you intersect two sets and get the empty set, there are no elements that occur in both of the original sets. Such sets are called "disjoint". When you have a whole bunch of sets, each of which is disjoint with every other set, you have pairwise disjoint sets.

    A picture that might be useful in understanding this situation is to think of R as a pie, and each Ri is a slice of that pie. The elements of each set are the crumbs that make up the pie, and each slice contains different crumbs, so each slice is pairwise disjoint with every other slice.

    Hope that helps some. If any of this is confusing I'd be happy to clarify.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  3. #3
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Little help with formula pseudocode

    Quote Originally Posted by Greyskull
    hello guys,

    I've got the following formula (see attached img),

    this is the first time ive encountered such mathematical symbol and i cnt seem to understand it >.<

    Here is what i fot of it so far:

    R is equal the set union of Ri where Ri contains the same elements of Rj and is not equal to 0? am i right on this 1?

    im a bit stuck on trying to develop a pseudocode for this as i havent encounter such symbol. any sugestion on this is truly appreciated...
    The different Ri and Rj have no elements in common, their intersection is empty (that's what the 0 slash symbol means, the empty set)
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: Little help with formula pseudocode

    thanks for the replies and point me in the right direction, i kinda had that idea from this:

    http://www.efunda.com/math/settheory/settheory.cfm

    but i guess i misunderstood what theyr saying :S

    To jemidiah, i wanted to use this formula to do some region segmentation in an image. S = total number of regions in an image.

    As for your pie example, i get the fact that each pie has diffrent crumbs but i dnt c d relation of this to the empty set :S sorz...

    Additional info: To make the formula wrk i must ensure that if satisfies the following conditions:

    H(Ri) = True, i = 1,2,3,.......,S -> i fink i get this bit
    and
    H(Ri U Rj) = False, i != j, Ri adjacent to Rj

    Thanks in advance
    Last edited by Greyskull; Mar 18th, 2008 at 05:36 PM.
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  5. #5
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Little help with formula pseudocode

    I'm not quite sure what you mean by the following. What is H? A function that returns True or False depending on which subset it gets passed?

    Quote Originally Posted by Greyskull
    Additional info: To make the formula wrk i must ensure that if satisfies the following conditions:

    H(Ri) = True, i = 1,2,3,.......,S -> i fink i get this bit
    and
    H(Ri U Rj) = False, i /= j, Ri adjacent to Rj

    Thanks in advance

    Using my previous pie example, you might imagine the empty set to be what you have when you take away every slice (and every component crumb) of the pie--you have no crumbs, and no elements in the resultant set. Now, what the intersection portion of your original formula is saying using this example is: consider any two different slices of the pie, and ignore all other slices. Consider which crumbs (elements) appear in both slices. How many of these crumbs are there?


    The answer is none, since we've constructed each slice to be made up of different crumbs. Converting the pie situation back to set theory, you are considering any two different Rn, and ignoring all other Rn's. Consider which elements appear in both Ri and Rj--that is, which elements appear in Ri {intersection symbol} Rj. How many of these elements are there? Since this intersection equals the empty set, we are forcing there to be no elements in common between these two sets (since the empty set contains 0 elements).
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  6. #6

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: Little help with formula pseudocode

    H(Ri) is the binary homogeneity evaluation of the region Ri.

    Thanks, for your explanation. I get it now (least i think i do). but nw i dnt know how the formula works for region segmentation - dividing an image into diffeent regions (i.e. say withi this image: http://home.att.net/~fukuoka/graphics/coins.jpg , this has 8 different regions).

    my initial idea was use the formual to look at each pixel and compare to it adjacent pixels if they contain the same element and is not a white pixel then its 1 region by seems like my idea is way off the mark?
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  7. #7
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Little help with formula pseudocode

    I can understand how the first set of formulas you posted would be included in dividing an image into regions--any set of Ri's would have to satisfy those conditions (they would form a Partition of R, that is, the image).

    I have no idea how the H function you've given fits in. If you properly defined "adjacent regions", you could probably define such a function, but I don't see how it would be useful....
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  8. #8

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: Little help with formula pseudocode

    hmm, i guess my research was jst a way off..hehe

    to be honest i dnt have a clue how im going to program this, all of my ideas seems to have gone off the mark...any suggestions?
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  9. #9
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Little help with formula pseudocode

    I really have no idea. I've never done any image recognition. For pictures like the one you posted, with a white background and objects positioned on it, you could map out the white region and then check for holes in the map where these objects must be, but even that really simple case is very complicated.

    My best advice would be to ask a computer science professor at a local college if you happen to know of any, or find some way around this image recognition.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  10. #10

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: Little help with formula pseudocode

    Thanks, i was thinkin of that idea as well
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width