• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
Saturday, September 13, 2025
newsaiworld
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
Morning News
No Result
View All Result
Home Machine Learning

Utilizing Constraint Programming to Clear up Math Theorems | by Yan Georget | Jan, 2025

Admin by Admin
January 12, 2025
in Machine Learning
0
1a6hwiqlphr0ek6rz1h7mfg.png
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

READ ALSO

If we use AI to do our work – what’s our job, then?

10 Python One-Liners Each Machine Studying Practitioner Ought to Know


Case research: the quasigroups existence drawback

Yan Georget

Towards Data Science

Some mathematical theorems might be solved by combinatorial exploration. On this article, we concentrate on the issue of the existence of some quasigroups. We’ll reveal the existence or non existence of some quasigroups utilizing NuCS. NuCs is a quick constraint solver written 100% in Python that I’m at the moment creating as a aspect mission. It’s launched beneath the MIT license.

Let’s begin by defining some helpful vocabulary.

Teams

Quoting wikipedia:

In arithmetic, a group is a set with an operation that associates a component of the set to each pair of parts of the set (as does each binary operation) and satisfies the next constraints: the operation is associative, it has an identification component, and each component of the set has an inverse component.

The set of integers (constructive and adverse) along with the addition kind a gaggle. There are a lot of of sort of teams, for instance the manipulations of the Rubik’s Dice.

Supply: Wikipedia

Latin squares

A Latin sq. is an n × n array crammed with n completely different symbols, every occurring precisely as soon as in every row and precisely as soon as in every column.

An instance of a 3×3 Latin sq. is:

Designed by the writer

For instance, a Sudoku is a 9×9 Latin sq. with further properties.

Quasigroups

An order m quasigroup is a Latin sq. of dimension m. That’s, a m×m multiplication desk (we’ll word ∗ the multiplication image) through which every component happens as soon as in each row and column.

The multiplication legislation doesn’t need to be associative. Whether it is, the quasigroup is a gaggle.

In the remainder of this text, we’ll concentrate on the issue of the existence of some specific quasigroups. The quasigroups we’re fascinated by are idempotent, that’s a∗a=a for each component a.

Furthermore, they’ve further properties:

  • QG3.m issues are order m quasigroups for which (a∗b)∗(b∗a)=a.
  • QG4.m issues are order m quasigroups for which (b∗a)∗(a∗b)=a.
  • QG5.m issues are order m quasigroups for which ((b∗a)∗b)∗b=a.
  • QG6.m issues are order m quasigroups for which (a∗b)∗b=a∗(a∗b).
  • QG7.m issues are order m quasigroups for which (b∗a)∗b=a∗(b∗a).

Within the following, for a quasigroup of order m, we word 0, …, m-1 the values of the quasigroup (we wish the values to match with the indices within the multiplication desk).

Latin sq. fashions

We’ll mannequin the quasigroup drawback by leveraging the latin sq. drawback. The previous is available in 2 flavors:

  • the LatinSquareProblem,
  • the LatinSquareRCProblem.

The LatinSquareProblem merely states that the values in all of the rows and columns of the multiplication desk need to be completely different:

self.add_propagators([(self.row(i), ALG_ALLDIFFERENT, []) for i in vary(self.n)])
self.add_propagators([(self.column(j), ALG_ALLDIFFERENT, []) for j in vary(self.n)])

This mannequin defines, for every row i and column j, the worth shade(i, j) of the cell. We’ll name it the shade mannequin. Symmetrically, we will outline:

  • for every row i and shade c, the column column(i, c): we name this the column mannequin,
  • for every shade c and column j, the row row(c, j): we name this the row mannequin.

Notice that we’ve got the next properties:

  • row(c, j) = i <=> shade(i, j) = c

For a given column j, row(., j) and shade(., j) are inverse permutations.

  • row(c, j) = i <=> column(i, c) = j

For a given shade c, row(c, .) and column(., c) are inverse permutations.

  • shade(i, j) = c <=> column(i, c) = j

For a given row i, shade(i, .) and column(i, .) are inverse permutations.

That is precisely what’s applied by the LatinSquareRCProblem with the assistance of the ALG_PERMUTATION_AUX propagator (word {that a} much less optimized model of this propagator was additionally utilized in my earlier article concerning the Travelling Salesman Downside):

def __init__(self, n: int):
tremendous().__init__(checklist(vary(n))) # the colour mannequin
self.add_variables([(0, n - 1)] * n**2) # the row mannequin
self.add_variables([(0, n - 1)] * n**2) # the column mannequin
self.add_propagators([(self.row(i, M_ROW), ALG_ALLDIFFERENT, []) for i in vary(self.n)])
self.add_propagators([(self.column(j, M_ROW), ALG_ALLDIFFERENT, []) for j in vary(self.n)])
self.add_propagators([(self.row(i, M_COLUMN), ALG_ALLDIFFERENT, []) for i in vary(self.n)])
self.add_propagators([(self.column(j, M_COLUMN), ALG_ALLDIFFERENT, []) for j in vary(self.n)])
# row[c,j]=i <=> shade[i,j]=c
for j in vary(n):
self.add_propagator(([*self.column(j, M_COLOR), *self.column(j, M_ROW)], ALG_PERMUTATION_AUX, []))
# row[c,j]=i <=> column[i,c]=j
for c in vary(n):
self.add_propagator(([*self.row(c, M_ROW), *self.column(c, M_COLUMN)], ALG_PERMUTATION_AUX, []))
# shade[i,j]=c <=> column[i,c]=j
for i in vary(n):
self.add_propagator(([*self.row(i, M_COLOR), *self.row(i, M_COLUMN)], ALG_PERMUTATION_AUX, []))

Quasigroup mannequin

Now we have to implement our further properties for our quasigroups.

Idempotence is solely applied by:

for mannequin in [M_COLOR, M_ROW, M_COLUMN]:
for i in vary(n):
self.shr_domains_lst[self.cell(i, i, model)] = [i, i]

Let’s now concentrate on QG5.m. We have to implement ((b∗a)∗b)∗b=a:

  • this interprets into: shade(shade(shade(j, i), j), j) = i,
  • or equivalently: row(i, j) = shade(shade(j, i), j).

The final expression states that the shade(j,i)th component of the jth column is row(i, j). To enforces this, we will leverage the ALG_ELEMENT_LIV propagator (or a extra specialised ALG_ELEMENT_LIV_ALLDIFFERENT optimized to take note of the truth that the rows and columns include parts which are alldifferent).

for i in vary(n):
for j in vary(n):
if j != i:
self.add_propagator(
(
[*self.column(j), self.cell(j, i), self.cell(i, j, M_ROW)],
ALG_ELEMENT_LIV_ALLDIFFERENT,
[],
)
)

Equally, we will mannequin the issues QG3.m, QG4.m, QG6.m, QG7.m.

Notice that this drawback could be very laborious for the reason that dimension of the search house is mᵐᵐ. For m=10, that is 1e+100.

The next experiments are carried out on a MacBook Professional M2 working Python 3.13, Numpy 2.1.3, Numba 0.61.0rc2 and NuCS 4.6.0. Notice that the current variations of NuCS are comparatively sooner than older ones since Python, Numpy and Numba have been upgraded.

The next proofs of existence/non existence are obtained in lower than a second:

Experiments with small situations

Let’s now concentrate on QG5.m solely the place the primary open drawback is QG5.18.

Experiments with QG5 (within the second line, we use a MultiprocessingSolver)

Going additional would require to lease a strong machine on a cloud supplier throughout just a few days no less than!

As we’ve got seen, some mathematical theorems might be solved by combinatorial exploration. On this article, we studied the issue of the existence/non existence of quasigroups. Amongst such issues, some open ones appear to be accessible, which could be very stimulating.

Some concepts to enhance on our present method to quasigroups existence:

  • refine the mannequin which continues to be pretty easy
  • discover extra refined heuristics
  • run the code on the cloud (utilizing docker, for instance)
Tags: ConstraintGeorgetJanMathProgrammingsolveTheoremsYan

Related Posts

Mike von 2hzl3nmoozs unsplash scaled 1.jpg
Machine Learning

If we use AI to do our work – what’s our job, then?

September 13, 2025
Mlm ipc 10 python one liners ml practitioners 1024x683.png
Machine Learning

10 Python One-Liners Each Machine Studying Practitioner Ought to Know

September 12, 2025
Luna wang s01fgc mfqw unsplash 1.jpg
Machine Learning

When A Distinction Truly Makes A Distinction

September 11, 2025
Mlm ipc roc auc vs precision recall imblanced data 1024x683.png
Machine Learning

ROC AUC vs Precision-Recall for Imbalanced Knowledge

September 10, 2025
Langchain for eda build a csv sanity check agent in python.png
Machine Learning

LangChain for EDA: Construct a CSV Sanity-Examine Agent in Python

September 9, 2025
Jakub zerdzicki a 90g6ta56a unsplash scaled 1.jpg
Machine Learning

Implementing the Espresso Machine in Python

September 8, 2025
Next Post
Arrington Capital Xrp Based Hedge Fund.jpg

Whales Scoop Up 1 Billion XRP in 2 Days as Buyers Brace for Worth Explosion ⋆ ZyCrypto

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POPULAR NEWS

0 3.png

College endowments be a part of crypto rush, boosting meme cash like Meme Index

February 10, 2025
Gemini 2.0 Fash Vs Gpt 4o.webp.webp

Gemini 2.0 Flash vs GPT 4o: Which is Higher?

January 19, 2025
1da3lz S3h Cujupuolbtvw.png

Scaling Statistics: Incremental Customary Deviation in SQL with dbt | by Yuval Gorchover | Jan, 2025

January 2, 2025
0khns0 Djocjfzxyr.jpeg

Constructing Data Graphs with LLM Graph Transformer | by Tomaz Bratanic | Nov, 2024

November 5, 2024
How To Maintain Data Quality In The Supply Chain Feature.jpg

Find out how to Preserve Knowledge High quality within the Provide Chain

September 8, 2024

EDITOR'S PICK

19lzdytyiwmofanpyysumpg.png

The Ideas Information Professionals Ought to Know in 2025: Half 1 | by Sarah Lea | Jan, 2025

January 19, 2025
Image 100 1024x683.png

Easy methods to Use LLMs for Highly effective Computerized Evaluations

August 13, 2025
Unnamed 2024 10 17t195443.340.jpg

Floki’s MMORPG Valhalla Pronounces New Partnership with Hafthor Júlíus Björnsson, “The Mountain” in Sport of Thrones

October 17, 2024
1mwkkyiz3xkpev7qi6wqhnw.png

Dealing with Hierarchies in Dimensional Modeling | by Krzysztof Okay. Zdeb | Jul, 2024

July 25, 2024

About Us

Welcome to News AI World, your go-to source for the latest in artificial intelligence news and developments. Our mission is to deliver comprehensive and insightful coverage of the rapidly evolving AI landscape, keeping you informed about breakthroughs, trends, and the transformative impact of AI technologies across industries.

Categories

  • Artificial Intelligence
  • ChatGPT
  • Crypto Coins
  • Data Science
  • Machine Learning

Recent Posts

  • Generalists Can Additionally Dig Deep
  • If we use AI to do our work – what’s our job, then?
  • ‘Sturdy Likelihood’ Of US Forming Strategic Bitcoin Reserve In 2025
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy

© 2024 Newsaiworld.com. All rights reserved.

No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us

© 2024 Newsaiworld.com. All rights reserved.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?