Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8722307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:23:00+00:00 2026-06-13T07:23:00+00:00

I know what is forward and cross edge. But I am finding difficulty in

  • 0

I know what is forward and cross edge. But I am finding difficulty in implementing them in program to find all the forward and cross edges in a given graph.

Any help in this regard would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:23:01+00:00Added an answer on June 13, 2026 at 7:23 am

    You can classify all graph edges with a DFS transversal:

    DFS-Visit(u)         ▷ with edge classification. G must be a directed graph
    
    1.        color[u] ← GRAY
    2.        time ← time + 1
    3.        d[u] ← time
    4.        for each vertex v adjacent to u
    5.            do if color[v] ← BLACK
    6.                then if d[u] < d[v]
    7.                            then Classify (u, v) as a forward edge
    8.                            else Classify (u, v) as a cross edge
    9.                        if color[v] ← GRAY
    10.                            then Classify (u, v) as a back edge
    11.                       if color[v] ← WHITE
    12.                            then π[v] ← u
    13.                                 Classify (u, v) as a tree edge
    14.                                 DFS-Visit(v)
    15.        color[u] ← BLACK
    16.        time ← time + 1
    17.        f[u] ← time
    

    As you can see here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First: where are std::move and std::forward defined? I know what they do, but I
I know this is probably straight forward, but this isnt working for me, I
i need to know How to forward all url to a single url in
In my game, you can move forward and backwards but I don't know how
I know that I can do: class Foo; but can I forward declare a
A very straight forward question, but I know there would be no easy answer.
I know Java Date Time is not a good way to go forward but
Pretty straight-forward, but don't really know if it's even feasible. Basically I'd like to
Having replaced a <jsp:forward page=URL> with a response.sendRedirect(URL); , I find I know lose
Seems like a common issue but I don't know a straight forward answer for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.