Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.prolog > #14753 > unrolled thread

Mercio’s Algorithm for Rational Tree Compare in Prolog

Started byMild Shock <janburse@fastmail.fm>
First post2025-08-04 02:52 +0200
Last post2025-11-28 15:12 +0100
Articles 2 on this page of 22 — 1 participant

Back to article view | Back to comp.lang.prolog


Contents

  Mercio’s Algorithm for Rational Tree Compare in Prolog Mild Shock <janburse@fastmail.fm> - 2025-08-04 02:52 +0200
    The Original Ganster (OG) of Gameification: IEEE 1044.1-1995 (Was: Mercio’s Algorithm for Rational Tree Compare in Prolog) Mild Shock <janburse@fastmail.fm> - 2025-08-04 13:48 +0200
      The Bitrot called Math Stack Exchange (Re: The Original Ganster (OG) of Gameification: IEEE 1044.1-1995) Mild Shock <janburse@fastmail.fm> - 2025-08-04 14:00 +0200
        I guess its back to Hopcroft and Karp.Re: The Bitrot called Math Stack Exchange) Mild Shock <janburse@fastmail.fm> - 2025-08-04 14:11 +0200
    Szpilrajn Theorem and Suzumura Consistency (Was: Mercio’s Algorithm for Rational Tree Compare in Prolog) Mild Shock <janburse@fastmail.fm> - 2025-08-06 01:50 +0200
      The good thing is we have at least Mercio’s Algorithm (Re: Szpilrajn Theorem and Suzumura Consistency) Mild Shock <janburse@fastmail.fm> - 2025-08-06 08:10 +0200
        Hopcroft and Karp’s is just Contraction (Was: The good thing is we have at least Mercio’s Algorithm) Mild Shock <janburse@fastmail.fm> - 2025-08-06 08:13 +0200
          Re: Hopcroft and Karp’s is just Contraction (Was: The good thing is we have at least Mercio’s Algorithm) Mild Shock <janburse@fastmail.fm> - 2025-08-06 08:23 +0200
        Should we use minimum_coa/3 ? (Was: The good thing is we have at least Mercio’s Algorithm) Mild Shock <janburse@fastmail.fm> - 2025-08-08 23:45 +0200
          Perfectly balanced , as all things should be! (Was: Should we use minimum_coa/3 ?) Mild Shock <janburse@fastmail.fm> - 2025-08-08 23:49 +0200
    Mercios decidability was already attested in 2012 (Was: Mercio’s Algorithm for Rational Tree Compare in Prolog) Mild Shock <janburse@fastmail.fm> - 2025-08-14 20:26 +0200
      Performance of Mercio’s Total Order (Was: Mercios decidability was already attested in 2012) Mild Shock <janburse@fastmail.fm> - 2025-08-15 23:49 +0200
        Fuzzy Testing is your Swiss Knife (Re: Performance of Mercio’s Total Order) Mild Shock <janburse@fastmail.fm> - 2025-08-15 23:55 +0200
          Yeah, we have another name! (Was: Fuzzy Testing is your Swiss Knife) Mild Shock <janburse@fastmail.fm> - 2025-08-16 12:38 +0200
          Monte Carlo sampling the frontier version (Was: Yeah, we have another name!) Mild Shock <janburse@fastmail.fm> - 2025-08-16 12:42 +0200
          AI most hated by formal verification (Was: Fuzzy Testing is your Swiss Knife) Mild Shock <janburse@fastmail.fm> - 2025-11-26 17:02 +0100
    An NPU could give 1000x more LIPS (Was: Mercio’s Algorithm for Rational Tree Compare in Prolog) Mild Shock <janburse@fastmail.fm> - 2025-11-27 14:19 +0100
      Neural Network based dif/2 respectively (#\=)/2 (Re: An NPU could give 1000x more LIPS) Mild Shock <janburse@fastmail.fm> - 2025-11-27 14:51 +0100
        Zeus: A Language for Expressing Algorithms in Hardware (Re: Neural Network based dif/2 respectively (#\=)/2) Mild Shock <janburse@fastmail.fm> - 2025-11-27 15:03 +0100
          Googles TPU muscle in 2017 [Prolog Community is Sleepy Joe] (Re: Zeus: A Language for Expressing Algorithms in Hardware) Mild Shock <janburse@fastmail.fm> - 2025-11-27 15:23 +0100
      100% serious Giga Logical Inferences per Second (GLIPS) (Was: An NPU could give 1000x more LIPS) Mild Shock <janburse@fastmail.fm> - 2025-11-28 14:50 +0100
        The tables have turned: GigaLIP on the Laptop? (Re: 100% serious Giga Logical Inferences per Second (GLIPS) Mild Shock <janburse@fastmail.fm> - 2025-11-28 15:12 +0100

Page 2 of 2 — ← Prev page 1 [2]


#15057 — 100% serious Giga Logical Inferences per Second (GLIPS) (Was: An NPU could give 1000x more LIPS)

FromMild Shock <janburse@fastmail.fm>
Date2025-11-28 14:50 +0100
Subject100% serious Giga Logical Inferences per Second (GLIPS) (Was: An NPU could give 1000x more LIPS)
Message-ID<10gc9bm$oenf$1@solani.org>
In reply to#15052
Hi,

I am 100% serious about Giga Logical Inferences
per Second (GLIPS). Leaving behind the sequential
constraint solving world:

The Complexity of Constraint Satisfaction Revisited
https://www.cs.ubc.ca/~mack/Publications/AIP93.pdf

Only I have missed the deep learning bandwagon,
never programmed with PyTorch or Keras. So even
for the banal problem of coding some

ReLU networks and shipping them to a GPU or NPU,
or a hybrid, I don't have much experience. So
I am marveling at papers such as:

Learning Variable Ordering Heuristics
for Solving Constraint Satisfaction Problems
https://arxiv.org/abs/1912.10762

Given that the AI Boom started after 2019,
the above paper is already old, and it has
currious antique terminology like Multilayer

Perceptron, which is not so common anymore?
It does also more than what I want to demonstrate,
it does also do policy learning.

Bye

Mild Shock schrieb:
> Hi,
> 
> I am spekulating an NPU could give 1000x more LIPS.
> For certain combinatorial search problems. It all
> boils down to implement this thingy:
> 
> In June 2020, Stockfish introduced the efficiently
> updatable neural network (NNUE) approach, based
> on earlier work by computer shogi programmers
> https://en.wikipedia.org/wiki/Stockfish_%28chess%29
> 
> There are varying degrees what gets updated of
> a neural network. But the specs of an NPU tell
> me very simply the following:
> 
> - An NPU can make 40 TFLOPS, all my AI Laptops
>    from 2025 can do that right now. The brands
>    are Intel Ultra, AMD Ryzen and Snapdragon X,
> 
>    but I guess there might be more brands around,
>    which can do that with a price tag less
>    than 1000.- USD.
> 
> - SWI Prolog can make 30 MLIPS, Dogelog Player
>    runs similar, some Prolog systems are faster.
> 
> Now thats is 10^12 versus 10^6. If some of the
> LIPS can be delegated to a NPU, and if we assume
> for example less locality or more primitive
> 
> operations that require a layering. Would could assume
> that from the NPU 10^12 a factor of 1000 goes
> away. So we might still see 10'9 LIPS emerge.
> 
> Now make the calculation:
> 
> - Without NPU: MLIPS
> - With NPU: GLIPS
> - Ratio: 1000x times faster
> 
> Have fun!
> 
> Bye
> 
> Mild Shock schrieb:
>> Mercio’s Algorithm (2012) for Rational
>> Tree Compare is specified here mathematically.
>> It is based on computing truncations A' = (A_0,
>> A_1, etc..) of a rational tree A:
>>
>> A < B ⟺ A′ <_lex B′
>>
>> https://math.stackexchange.com/a/210730
>>
>> Here is an implementation in Prolog.
>> First the truncation:
>>
>> trunc(_, T, T) :- var(T), !.
>> trunc(0, T, F) :- !, functor(T, F, _).
>> trunc(N, T, S) :-
>>     M is N-1,
>>     T =.. [F|L],
>>     maplist(trunc(M), L, R),
>>     S =.. [F|R].
>>
>> And then the iterative deepening:
>>
>> mercio(N, X, Y, C) :-
>>     trunc(N, X, A),
>>     trunc(N, Y, B),
>>     compare(D, A, B),
>>     D \== (=), !, C = D.
>> mercio(N, X, Y, C) :-
>>     M is N + 1,
>>     mercio(M, X, Y, C).
>>
>> The main entry first uses (==)/2 for a
>> terminating equality check and if the
>> rational trees are not equal, falls back
>> to the iterative deepening:
>>
>> mercio(C, X, Y) :- X == Y, !, C = (=).
>> mercio(C, X, Y) :- mercio(0, X, Y, C).
>>
>> I couldn’t find yet a triple that violates
>> transitivity. But I am also not much happy
>> with the code. Looks a little bit expensive
>> to create a truncation copy iteratively.
>>
>> Provided there is really no counter example,
>> maybe we can do mit more smart and faster? It
>> might also stand the test of conservativity?
> 

[toc] | [prev] | [next] | [standalone]


#15058 — The tables have turned: GigaLIP on the Laptop? (Re: 100% serious Giga Logical Inferences per Second (GLIPS)

FromMild Shock <janburse@fastmail.fm>
Date2025-11-28 15:12 +0100
SubjectThe tables have turned: GigaLIP on the Laptop? (Re: 100% serious Giga Logical Inferences per Second (GLIPS)
Message-ID<10gcakd$ofi3$2@solani.org>
In reply to#15057
Hi,

Notably we try to do something with AI laptops
that came out in 2025. Tapping into their NPU.
Back in the late 80's GigaLIP were rather

hypothetical, small machines could hardly
do KLIPs. Today small machines do easily MLIPs.
But hardly any popular Prolog systems already taps

into the AI Boom, they are all Sleepy Joes.
Not to mention populate by morons like Boris the
Loris and Nazi Retard Julio.

They simply cannot connect the dots.

Bye

P.S.: Nice travel to the past is this paper:

Is a GigaLIP Fast Enough?
TOM W. KELLER - December 1988
DOI: 10.1007/BF00436711

Mild Shock schrieb:
> Hi,
> 
> I am 100% serious about Giga Logical Inferences
> per Second (GLIPS). Leaving behind the sequential
> constraint solving world:
> 
> The Complexity of Constraint Satisfaction Revisited
> https://www.cs.ubc.ca/~mack/Publications/AIP93.pdf
> 
> Only I have missed the deep learning bandwagon,
> never programmed with PyTorch or Keras. So even
> for the banal problem of coding some
> 
> ReLU networks and shipping them to a GPU or NPU,
> or a hybrid, I don't have much experience. So
> I am marveling at papers such as:
> 
> Learning Variable Ordering Heuristics
> for Solving Constraint Satisfaction Problems
> https://arxiv.org/abs/1912.10762
> 
> Given that the AI Boom started after 2019,
> the above paper is already old, and it has
> currious antique terminology like Multilayer
> 
> Perceptron, which is not so common anymore?
> It does also more than what I want to demonstrate,
> it does also do policy learning.
> 
> Bye
> 
> Mild Shock schrieb:
>> Hi,
>>
>> I am spekulating an NPU could give 1000x more LIPS.
>> For certain combinatorial search problems. It all
>> boils down to implement this thingy:
>>
>> In June 2020, Stockfish introduced the efficiently
>> updatable neural network (NNUE) approach, based
>> on earlier work by computer shogi programmers
>> https://en.wikipedia.org/wiki/Stockfish_%28chess%29
>>
>> There are varying degrees what gets updated of
>> a neural network. But the specs of an NPU tell
>> me very simply the following:
>>
>> - An NPU can make 40 TFLOPS, all my AI Laptops
>>    from 2025 can do that right now. The brands
>>    are Intel Ultra, AMD Ryzen and Snapdragon X,
>>
>>    but I guess there might be more brands around,
>>    which can do that with a price tag less
>>    than 1000.- USD.
>>
>> - SWI Prolog can make 30 MLIPS, Dogelog Player
>>    runs similar, some Prolog systems are faster.
>>
>> Now thats is 10^12 versus 10^6. If some of the
>> LIPS can be delegated to a NPU, and if we assume
>> for example less locality or more primitive
>>
>> operations that require a layering. Would could assume
>> that from the NPU 10^12 a factor of 1000 goes
>> away. So we might still see 10'9 LIPS emerge.
>>
>> Now make the calculation:
>>
>> - Without NPU: MLIPS
>> - With NPU: GLIPS
>> - Ratio: 1000x times faster
>>
>> Have fun!

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.prolog


csiph-web