Thread: Determining whether the set is reflexive, symmetric, anti symmetric and transtitive

  1. #16
    Registered User
    Join Date
    Nov 2011
    Posts
    37
    Don't declare new variables a,b - this is only confusing, use a[i] and b[i] directly.
    Anyway I don't understand what you try to accomplish.
    Let's try a new thing, leave writing code, describe your algorithm to find reflexive set in words (no code), I believe the algorithm you have in mind isn't good.
    Then we will implement it.

  2. #17
    Registered User
    Join Date
    Nov 2011
    Posts
    10
    set hold to true
    for each index i
    set a = A[i]
    set b = B[i]
    set hold to false
    for each index j
    if A[j] is b
    if B[j] is a
    set hold to true
    break
    if hold is false
    print "Reflexive - No"
    break
    if hold is true
    print "Reflexive - Yes"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DataGridView symmetric values for the main diagonal ?
    By Borislav in forum C# Programming
    Replies: 0
    Last Post: 10-24-2011, 10:45 PM
  2. Replies: 17
    Last Post: 11-16-2006, 09:06 PM
  3. Anti-virus
    By Dragon227Slayer in forum Tech Board
    Replies: 4
    Last Post: 06-15-2004, 09:21 AM
  4. Anti-VB
    By BillBoeBaggins in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-07-2004, 04:05 PM
  5. Are you for MS or Anti-MS?
    By Fool in forum A Brief History of Cprogramming.com
    Replies: 39
    Last Post: 09-10-2001, 06:09 AM

Tags for this Thread