Forum
»
comp sci brahs...
- Results 1 to 9 of 9
-
Page 1 of 1
Thread: comp sci brahs...
10-12-2020, 11:31 PM
-
#1
- miscerForLulz
- Join Date: Aug 2016
- Posts: 8,455
- 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)
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.
10-12-2020, 11:43 PM
-
#2
- MuslimBrahSwag
- Banned
-
- MuslimBrahSwag
- Banned
- Join Date: May 2020
- Age: 56
- Posts: 2,491
- 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.
Not sure if this makes sense but thats literally the easiest way to solve these types of problems.
10-12-2020, 11:45 PM
-
#3
- miscerForLulz
- Join Date: Aug 2016
- Posts: 8,455
- Rep Power: 50878
-
-
Originally Posted By Slurgie⏩
tradie detected...This is the useless chit they're making you learn in comp sci classes?
ayyyyylmao
ayyyyylmao
Originally Posted By MuslimBrahSwag⏩
yeah but you know you gotta explain this chitIf 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.
Not sure if this makes sense but thats literally the easiest way to solve these types of problems.
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.
10-12-2020, 11:45 PM
-
#4
- MuslimBrahSwag
- Banned
-
- MuslimBrahSwag
- Banned
- Join Date: May 2020
- Age: 56
- Posts: 2,491
- Rep Power: 0
-
-
Originally Posted By Slurgie⏩
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 insteadThis is the useless chit they're making you learn in comp sci classes?
ayyyyylmao
ayyyyylmao
10-12-2020, 11:47 PM
-
#5
- MuslimBrahSwag
- Banned
-
- MuslimBrahSwag
- Banned
- Join Date: May 2020
- Age: 56
- Posts: 2,491
- Rep Power: 0
-
-
Originally Posted By miscerForLulz⏩
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.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)
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)
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
10-12-2020, 11:50 PM
-
#6
- miscerForLulz
- Join Date: Aug 2016
- Posts: 8,455
- Rep Power: 50878
-
-
Originally Posted By MuslimBrahSwag⏩
For q implies p?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
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
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.
10-12-2020, 11:52 PM
-
#7
- MuslimBrahSwag
- Banned
-
- MuslimBrahSwag
- Banned
- Join Date: May 2020
- Age: 56
- Posts: 2,491
- 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
show that if a depth first search forest does not have a back edge, then directed graph G does not have a cycle
10-12-2020, 11:53 PM
-
#8
- miscerForLulz
- Join Date: Aug 2016
- Posts: 8,455
- Rep Power: 50878
-
-
Originally Posted By MuslimBrahSwag⏩
So use contrapositive? Ok lemme try that...>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
show that if a depth first search forest does not have a back edge, then directed graph G does not have a cycle
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.
10-13-2020, 12:13 AM
-
#9
- NosyJossie
- Registered User
-
- NosyJossie
- Registered User
- Join Date: Dec 2016
- Location: United States
- Posts: 14,844
- 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.
If you construct a back-edge, it takes you back: x2-> x1.
Same for any number of nodes.
Bookmarks
-
- Digg
-
- del.icio.us
-

- StumbleUpon
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts