Picat Solutions for the 2025 LPCP Programming Contest Problems

26 views
Skip to first unread message

Neng-Fa Zhou

unread,
Sep 21, 2025, 12:25:24 PMSep 21
to Picat
Following the tradition, I have completed solutions in Picat for all the five problems used in the 2025  LP/CP Programming Contest. 

All the solutions, except for Problem 5, use SAT. The solution for Problem 5 employs CP, which is much faster than SAT when repeatedly solving small and easy problems.

I couldn’t get the initial solution for Problem 3 to work on site because it didn’t remove duplicate edges in the hcp(Vs, Es) constraint. Perhaps Picat should issue a warning when Es contains duplicate edges.

The problems this year were significantly more challenging than last year’s. I needed about 10 hours to write the solution for Problem 2. I used ASP Chef to clarify the problem description and verify the solution; without it, completing the solution would have taken much longer."

Thanks to Marco Gavanelli's stellar performance (Marco used ECLiPSe-Prolog),  our p(Picat/Prolog) team won the first place. Congratulations to the team, especially Marco.

Cheers,
Neng-Fa

David Silverman

unread,
Sep 22, 2025, 2:26:12 PMSep 22
to Picat
Fantastic!

Claudio Cesar de Sá

unread,
Sep 22, 2025, 7:16:37 PMSep 22
to Picat
 Really, another great achievement by PICAT!
by the way, what is the "ASP Chef" as claritier? Is it a site or from LP/CP Programming Contest.

Congrats for you and Marco

cc


Neng-Fa Zhou

unread,
Sep 23, 2025, 9:15:17 AMSep 23
to Picat
I should have mentioned a nice feature of Picat used in the solution for Problem-5:

solve_all([$limit(2)],A) = [_]

The limit(N) option limits the number of solutions found by solve_all to N. I remember that Hakan requested the addition of this option. This is really nice to check if there is only a unique solution in a CSP.

Cheers,
NF

--
You received this message because you are subscribed to the Google Groups "Picat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picat-lang+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picat-lang/5a79546b-0d32-4f32-98c3-e79f625e9449n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages