Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting, how about:

    if $5 then pizza
    if $2 then beer
    $6!
The priority might be to acquire the most valuable item (pizza), or to spend the most money (3 beers), or to have the most money left over with nothing left to buy (pizza again), etc. Is there a way to describe those kinds of goals/constraints within the same system?


Linear logic itself doesn't express goals or constraints, just what can be accomplished with a given set of resources.

In the example you gave:

    if $5 then pizza
    if $2 then beer
    $6!
    therefore, (pizza and $1) OR (beer and $4) OR (beer and beer and $2) OR (beer and beer and beer) OR $6




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: