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 9242885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:40:57+00:00 2026-06-18T08:40:57+00:00

Given a graph where each node may contain arbitrary dependencies or conflicts with other

  • 0

Given a graph where each node may contain arbitrary dependencies or conflicts with other nodes leading to any possible arrangement including circular and contradictory references.

I’m trying to compute a stable result list maximally containing a list of nodes able to respect all of their constraints. I just need to find one possible solution if there is one to be had.

In the examples below “A depends on B” means for A to be true B must be true. “B conflicts with A” means for B to be true A must not be true. There is no precedence both dependencies and conflicts with have equal weight and apply concurrently.

On 3rd example ‘A’ does not appear because it depends on D which conflicts with B. Since A also requires B .. A cannot exist as D’s conflict and A’s dependencies forbid it.

A depends on B
B conflicts with A
= B

A depends on B
B depends on A
= A and B

A depends on B
A depends on D
B depends on C
D conflicts with B
D conflicts with C
= B and C or D

A conflicts with B
B conflicts with C
C conflicts with D
D conflicts with A
= A and C or B and D

I’ve been trying to come up with an algorithm that works but so far my efforts resemble heuristical gobblygook which fail spectacularly on non-trivial graphs. Any insights, pointers to reading material or names of algorithms would be much 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-18T08:40:58+00:00Added an answer on June 18, 2026 at 8:40 am

    I assume that

    • “A depends on B” means A implies B and
    • “B conflicts with A” means B implies not A.

    Now, you have A implies B = not A or B and B implies not A = not B or not A. This means that the problem boils down to finding a solution for a conjunction of disjunctions (also known as clauses) where each clause has two arguments (A, not A, B, or not B).

    This problem is known as 2-satisfiability. You find polynomial time algorithms in the web, e.g., start at http://en.wikipedia.org/wiki/2-satisfiability.

    As far as I understand resolution in modern SAT solvers, there is no need to write your own algorithm. A SAT solver should be able to solve such instances automatically in polynomial time.

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

Sidebar

Related Questions

Given a directed graph, the goal is to combine the node with the nodes
Given a n*n-sized multi-headed acyclic graph where each node has at most three children
I am building graphs. A graph consists of nodes linked each other with links
Given an undirected graph in which each node has a Cartesian coordinate in space
Given an undirected graph with n nodes, where each of the nodes has a
We are given a graph G(V,E) with N nodes (Numbered from 0 to N-1)
Given a node x in an undirected graph that is known to be part
In the Lemon C++ Graph Library, given a node in an undirected graph say,
Given a DAG, in which each node belongs to a category, how can this
I have an undirected graph G with about 5000 nodes. Any pair of nodes

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.