Re: CLP(FD) Prolog: help needed with a simple problem

From: Chema (sipser_at_hotmail.it)
Date: 03/29/05


Date: Tue, 29 Mar 2005 07:39:03 GMT

Bart Demoen wrote:

> now impose:
>
> [AB,AC,BC] in 0..1
>
> and the condition that AB+AC+CD = (|V|-1) (2 in this case)
>
> and AB=1 \/ AC=1 && AB=1 \/ BC=1 && AC=1 \/ BC=1

I got the point, but the problem is: I've to impose this kind of
condition for each subgraph. Consider an undirected graph G=(V,E)
with E = (a,b), (b,c), (c,d), (d,h), (e,h), (a,e), (b,e), (b,h),
(c,h), (e,f), (f,h), (h,g), (d,g), (f,g)
You see, I should include at least two constrains for each cycle.
This is an NP hard problem, and this constrains grow in an
esponential way... I can't do that "manually".

An idea should be Markus's one, to query in "standard" prolog
cycles in G, but now my problem is: if I query the edges that
participate in a cycle, I get a "grounded" answer, not variables
anymore. And I can I set a domain [0..1] in a grounded set?

I'm confused :-)

Anyway, thank you for your help.

Regards



Relevant Pages

  • Re: Access Query
    ... I have a query that lists all of the records between two dates, these records contain Machine owner, machine serial number and machine cycle count among other things. ... Create a new query, drop in Query1, drop the fields you want to display from Query1, and create a new column called CycleValue. ... Public Function GetPreviousCycle(dat As Date, strCustID as String, _ ...
    (comp.databases.ms-access)
  • Re: Writing Executable VBA Statements
    ... adverse event will be a candidate for duplication. ... When it does show up in the next cycle, the value of the “Continuing at end ... actuating this query from VBA. ... In the earlier duplication button’s ‘ON Click’ event, ...
    (microsoft.public.access.formscoding)
  • Re: Writing Executable VBA Statements
    ... >are being cloned in the next cycle. ... The query we've been working on all this time will only add ... records is a whole 'nother operation that should be ... Not until you have the requirements and design ...
    (microsoft.public.access.formscoding)
  • Re: Writing Executable VBA Statements
    ... say i also need a query or two. ... Patient Number and Cycle number as the record the user was viewing on his ... >> hi rob, and first of all, thanks for the bandwidth. ... >> been duplicated the first time for this bulk duplication. ...
    (microsoft.public.access.formscoding)
  • SQL append query with A2K
    ... Dim Response As Integer ... "for this patient's next cycle were already entered. ... immediately above VBA into my SQL query? ... field whenever a new record were appended using the SQL query at top. ...
    (microsoft.public.access.queries)