Log In

Your email is not your username

Register

If you were a member of the old Bodybuilding.com forums and would like to reuse your previous username, you can request it below. We use your email only for registration and do not store it. For more information, please see our Privacy Policy.

Confirm your email

A registration code was sent to your email. Enter it here.

Welcome

You have successfully setup your account.

Sign in

Quick Navigation Bottom Misc
Forum
» comp sci brahs...
  1. Results 1 to 9 of 9
post 1619211491 10-12-2020, 11:31 PM
-
#1
  1. miscerForLulz
  1. miscerForLulz
  2. Join Date: Aug 2016
  3. Posts: 8,455
  4. Rep Power: 50878

comp sci brahs...

prove this

A directed graph G has a directed cycle iff a depth-first-search forest has a back edge...

p <--> q

I got q-->p which is pretty straightforward but how about p-->q?

Assume a graph has a cycle...
Say you have vertexes v1-->v2-->,...,vk-->v1 (so some cycle here of vertexes)

Idk if that's a way to start but fuarkkkk I have no idea...maybe it's time to become a tradie (lol @ tradies srs)
2:136
Say, ˹O believers,˺ We believe in Allah and what has been revealed to us; and what was revealed to Abraham, Ishmael, Isaac, Jacob, and his descendants; what was given to Moses, Jesus, and other prophets from their Lord. We make no distinction between any of them. And to Allah we all submit.
post 1619212221 10-12-2020, 11:43 PM
-
#2
  1. MuslimBrahSwag
  2. Banned
  1. MuslimBrahSwag
  2. Banned
  3. Join Date: May 2020
  4. Age: 56
  5. Posts: 2,491
  6. Rep Power: 0
If you got q->p just trace the problem back from p to q.

Not sure if this makes sense but thats literally the easiest way to solve these types of problems.
post 1619212271 10-12-2020, 11:45 PM
-
#3
  1. miscerForLulz
  1. miscerForLulz
  2. Join Date: Aug 2016
  3. Posts: 8,455
  4. Rep Power: 50878
Originally Posted By Slurgie
This is the useless chit they're making you learn in comp sci classes?

ayyyyylmao
tradie detected...
Originally Posted By MuslimBrahSwag
If you got q->p just trace the problem back from p to q.

Not sure if this makes sense but thats literally the easiest way to solve these types of problems.
yeah but you know you gotta explain this chit
it's fking obv that if you have a cycle, then you have a back edge...problem is saying it in a way that will get me marks (semi-retarded srs)

C's get degreeessss nomsayin....
2:136
Say, ˹O believers,˺ We believe in Allah and what has been revealed to us; and what was revealed to Abraham, Ishmael, Isaac, Jacob, and his descendants; what was given to Moses, Jesus, and other prophets from their Lord. We make no distinction between any of them. And to Allah we all submit.
post 1619212291 10-12-2020, 11:45 PM
-
#4
  1. MuslimBrahSwag
  2. Banned
  1. MuslimBrahSwag
  2. Banned
  3. Join Date: May 2020
  4. Age: 56
  5. Posts: 2,491
  6. Rep Power: 0
Originally Posted By Slurgie
This is the useless chit they're making you learn in comp sci classes?

ayyyyylmao
yes this is trivial chit you will never see in your career, yet you have to do it. Luckily its not some advanced math like real analysis or some chit, but its stupid af that they dont teach you practical job related chit but this instead
post 1619212461 10-12-2020, 11:47 PM
-
#5
  1. MuslimBrahSwag
  2. Banned
  1. MuslimBrahSwag
  2. Banned
  3. Join Date: May 2020
  4. Age: 56
  5. Posts: 2,491
  6. Rep Power: 0
Originally Posted By miscerForLulz
tradie detected...



yeah but you know you gotta explain this chit
it's fking obv that if you have a cycle, then you have a back edge...problem is proving it (semi-retarded srs)
right so say you start at step 1 which is q. then in your proof you have step 2.. step 3.. then so on until you reach step n which is p.

You just have to show from step n that you can arrive to step n-1 using logic. and the rest should be easy. Post your first proof and I can help you out srs
post 1619212691 10-12-2020, 11:50 PM
-
#6
  1. miscerForLulz
  1. miscerForLulz
  2. Join Date: Aug 2016
  3. Posts: 8,455
  4. Rep Power: 50878
Originally Posted By MuslimBrahSwag
right so say you start at step 1 which is q. then in your proof you have step 2.. step 3.. then so on until you reach step n which is p.

You just have to show from step n that you can arrive to step n-1 using logic. and the rest should be easy. Post your first proof and I can help you out srs
For q implies p?

Ok assume (x,y) is a back edge...then we know the tree edges (--->) from y to x and the edge (x,y) is a directed cycle

y --->arbitraryVertex1--->arbitraryVertex2--->...--->arbitraryVertexK--->x--->y
2:136
Say, ˹O believers,˺ We believe in Allah and what has been revealed to us; and what was revealed to Abraham, Ishmael, Isaac, Jacob, and his descendants; what was given to Moses, Jesus, and other prophets from their Lord. We make no distinction between any of them. And to Allah we all submit.
post 1619212801 10-12-2020, 11:52 PM
-
#7
  1. MuslimBrahSwag
  2. Banned
  1. MuslimBrahSwag
  2. Banned
  3. Join Date: May 2020
  4. Age: 56
  5. Posts: 2,491
  6. Rep Power: 0
>A directed graph G has a directed cycle iff a depth-first-search forest has a back edge

show that if a depth first search forest does not have a back edge, then directed graph G does not have a cycle
post 1619212851 10-12-2020, 11:53 PM
-
#8
  1. miscerForLulz
  1. miscerForLulz
  2. Join Date: Aug 2016
  3. Posts: 8,455
  4. Rep Power: 50878
Originally Posted By MuslimBrahSwag
>A directed graph G has a directed cycle iff a depth-first-search forest has a back edge

show that if a depth first search forest does not have a back edge, then directed graph G does not have a cycle
So use contrapositive? Ok lemme try that...
2:136
Say, ˹O believers,˺ We believe in Allah and what has been revealed to us; and what was revealed to Abraham, Ishmael, Isaac, Jacob, and his descendants; what was given to Moses, Jesus, and other prophets from their Lord. We make no distinction between any of them. And to Allah we all submit.
post 1619213581 10-13-2020, 12:13 AM
-
#9
  1. NosyJossie
  2. Registered User
  1. NosyJossie
  2. Registered User
  3. Join Date: Dec 2016
  4. Location: United States
  5. Posts: 14,844
  6. Rep Power: 159116
A graph has a node x1 and x2.

If you construct a back-edge, it takes you back: x2-> x1.

Same for any number of nodes.
Quick Navigation Top Misc
Bookmarks
Digg.com
Digg
del.icio.us
del.icio.us
Stumbleupon.com
StumbleUpon
Google.com
Google
Facebook.com
Facebook
Posting Permissions
  1. You may not post new threads
  2. You may not post replies
  3. You may not post attachments
  4. You may not edit your posts