Simulator

136 views
Skip to first unread message

Tom Sirgedas

unread,
Jan 27, 2022, 1:19:33 AM1/27/22
to Hadwiger-Nelson problem
https://drive.google.com/file/d/1rc59Go3ZL0N_pLYkTWIPMOT03RabJeC8/view?usp=sharing

Does the EXE run? Not 100% sure which DLLs are needed.

If it works, I'll post instructions for using the app.

Яан Партс

unread,
Jan 27, 2022, 10:30:00 AM1/27/22
to Hadwiger-Nelson problem
sim1.jpg

четверг, 27 января 2022 г. в 09:19:33 UTC+3, tsir...@gmail.com:

Яан Партс

unread,
Jan 27, 2022, 10:33:23 AM1/27/22
to Hadwiger-Nelson problem
I tried to copy all DLL's into one folder. It didn't work.

четверг, 27 января 2022 г. в 18:30:00 UTC+3, Яан Партс:

Яан Партс

unread,
Jan 27, 2022, 10:43:49 AM1/27/22
to Hadwiger-Nelson problem
I've fixed the probleme by renaming "might need" to "platforms"

четверг, 27 января 2022 г. в 18:33:23 UTC+3, Яан Партс:

Яан Партс

unread,
Jan 27, 2022, 11:01:23 AM1/27/22
to Hadwiger-Nelson problem
sim2.jpg

It works, but I need instructions

четверг, 27 января 2022 г. в 18:43:49 UTC+3, Яан Партс:

Яан Партс

unread,
Jan 27, 2022, 12:05:11 PM1/27/22
to Hadwiger-Nelson problem
What am I doing wrong here?
sim3.jpg
четверг, 27 января 2022 г. в 19:01:23 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Jan 27, 2022, 1:09:37 PM1/27/22
to Hadwiger-Nelson problem

Usage:

- position mouse and hit <delete> to delete a vertex
- position mouse and hit "0", "1", "2", ..., "9" to add a vertex (9 is a special "null" color) -- or hit "B" for blue, "G" for green, etc.
- holding the "M" key lets you drag vertices in the dual graph
- holding the "E" key lets you toggle edges in the dual graph -- drag from one vertex to another
- hit [dual->tile] to create a tile graph from the dual graph
- you can drag vertices on the dual graph to reposition them


>What am I doing wrong here?

You can ignore the error message "edge 0 1 is curved..." -- I added in logic so that a polygon in the dual graph with 7+ vertices is considered a "hole", but I didn't update the error message logic.

Also, the simulator doesn't like the dual graph having skinny chain of single vertices. Add in some "null" vertices to make the "chain" wider.

Here's a video: https://www.screencast.com/t/XFCl3D5Y

Tom Sirgedas

unread,
Jan 27, 2022, 1:13:01 PM1/27/22
to Hadwiger-Nelson problem
Snag_1ee07ca5.png

making the chain wider (at 4:00 in the video)

Яан Партс

unread,
Jan 28, 2022, 10:45:17 AM1/28/22
to Hadwiger-Nelson problem
That's great, thank you. Could you please clarify once again the exact meaning of parameters "Radius" and "Tile dist"? 
Do I understand right that the maximum number of colors is 8? Is it possibble to increase it? I'll need up to 16 colors, I think.
We could enter additional colors by pressing Shift, for example.

четверг, 27 января 2022 г. в 21:09:37 UTC+3, tsir...@gmail.com:

Tom Sirgedas

unread,
Jan 28, 2022, 10:55:44 AM1/28/22
to Hadwiger-Nelson problem
"Radius" is for graphs on a sphere, so you can ignore that.
If tile A and tile B are the same color, then each vertex of A needs to be at least distance 1 away from each vertex of B. "Tile dist" lets you set a value other than 1. (Vertices on the same tile are always unit distance apart at most).

Yeah, more colors should be easy. Just need to make up some new colors.


Яан Партс

unread,
Jan 28, 2022, 11:07:02 AM1/28/22
to Hadwiger-Nelson problem
Let me illustrate my difficulties by a simple example. I want to check maximum radius of radial coloring of annulus
(where each tile occupies entirely some range of angles between two circles).
How should I do it? Below I show my attempts (obviously wrong) to do it.
sim5.jpgsim4.jpg

пятница, 28 января 2022 г. в 18:45:17 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Jan 28, 2022, 11:44:32 AM1/28/22
to Hadwiger-Nelson problem
Hmm, I don't think it's possible right now. I haven't needed to simulate anything that's just one tile thick before. I'll take a look at the logic to see if it's easy to change.

Яан Партс

unread,
Jan 28, 2022, 12:18:42 PM1/28/22
to Hadwiger-Nelson problem
Just in case, I will clarify that I am not interested in simple things like radial coloring. I want to get the coloring of the annulus in the same number of colors that beats the radial one. But at the same time, most likely, it will partially look like a radial in a limited range of angles.

пятница, 28 января 2022 г. в 19:44:32 UTC+3, tsir...@gmail.com:

Tom Sirgedas

unread,
Jan 28, 2022, 12:50:01 PM1/28/22
to Hadwiger-Nelson problem
Snag_224ea387.png

ok i think i got it

Tom Sirgedas

unread,
Jan 28, 2022, 1:00:55 PM1/28/22
to Hadwiger-Nelson problem
ok version 2 is here:

https://drive.google.com/file/d/13fgw5npj1VSCORGtsKxQGcNBLG_8x4i9/view?usp=sharing


Now, a skinny chain of vertices in the dual graph should work ok.

Also, press <shift>+0,  <shift>+1,  ..., <shift>+9 to get more colors

Snag_2258affa.png

Яан Партс

unread,
Jan 28, 2022, 1:10:26 PM1/28/22
to Hadwiger-Nelson problem
Great! Many thanks. Looks like this is exactly what I wanted.

пятница, 28 января 2022 г. в 21:00:55 UTC+3, tsir...@gmail.com:

Tom Sirgedas

unread,
Jan 28, 2022, 2:42:24 PM1/28/22
to Hadwiger-Nelson problem
One thing to be cautious about is line-vertex distances. The simulator nudges vertices apart, but it's possible for vertex c to be too close to line a b.

I have some code for nudging line-vertex pairs apart, but it's commented out -- I can't remember why. Maybe for performance? Also this version of the simulator doesn't show length violations. That shouldn't be hard to add in.

Snag_2456425b.png

Яан Партс

unread,
Jan 29, 2022, 12:03:19 PM1/29/22
to Hadwiger-Nelson problem

OK. I'll be careful
пятница, 28 января 2022 г. в 22:42:24 UTC+3, tsir...@gmail.com:

Tom Sirgedas

unread,
Jan 31, 2022, 5:27:43 PM1/31/22
to Hadwiger-Nelson problem
Hey, I added in a checkbox to "Show Violations". It will draw a line for each distance constraint that's violated by a distance of more than .0001

Snag_32be4641.png

get the new version here:  https://drive.google.com/file/d/1XD0knxlU-C985udVdROpej-MsGS908KA/view?usp=sharing

Яан Партс

unread,
Feb 6, 2022, 2:07:30 AM2/6/22
to Hadwiger-Nelson problem
Tom, could you explain in more detail, how to use symmetries?

вторник, 1 февраля 2022 г. в 01:27:43 UTC+3, tsir...@gmail.com:

Яан Партс

unread,
Feb 6, 2022, 4:26:12 AM2/6/22
to Hadwiger-Nelson problem
p13.jpg

Something is going wrong. I tried to do a 13-coloring of the plane using regular hexagons, but they began to curve in a strange way. 

Further, I noticed that tiles of some colors have lost constraints on some diagonals. Of those that I observed - colors 5, 6, 7, 8, SHIFT+4.


воскресенье, 6 февраля 2022 г. в 10:07:30 UTC+3, Яан Партс:

Яан Партс

unread,
Feb 20, 2022, 4:24:16 AM2/20/22
to Hadwiger-Nelson problem
Hi, Tom! Haven't had time to look at the simulator yet?

воскресенье, 6 февраля 2022 г. в 12:26:12 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Feb 20, 2022, 2:42:28 PM2/20/22
to Hadwiger-Nelson problem
Hmm, I tried making the same graph and I haven't seen these problems. Can you send your file?

I attached mine (jaan13.dual).

Snag_51c1bf.png

I think maybe you just need to stretch your graph out a bit? -- it 
- click "None"
- type "5" into the outer disk radius (under the "Disk")
- click "Disk"

This will "stretch" your graph

If you are happier with this graph then click "[centroid]" to adjust your dual graph vertices.



jaan13.dual

Яан Партс

unread,
Feb 20, 2022, 3:40:47 PM2/20/22
to Hadwiger-Nelson problem
How to send file here?

I think you will see problemes, when you will set TileDistance>2.4

воскресенье, 20 февраля 2022 г. в 22:42:28 UTC+3, tsir...@gmail.com:

Яан Партс

unread,
Feb 20, 2022, 3:50:46 PM2/20/22
to Hadwiger-Nelson problem
Well, I almost don't see problems with your dual. The exception are some black tiles.
But I see many problems with my duals.

воскресенье, 20 февраля 2022 г. в 23:40:47 UTC+3, Яан Партс:

Яан Партс

unread,
Feb 20, 2022, 3:55:15 PM2/20/22
to Hadwiger-Nelson problem
p13a.jpg

Here you can see, that orange, cyan and white tiles clearly do not have all green violations.

воскресенье, 20 февраля 2022 г. в 23:50:46 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Feb 20, 2022, 4:06:58 PM2/20/22
to Hadwiger-Nelson problem
I'm using https://groups.google.com/g/hadwiger-nelson-problem/c/a701Kwnhp_A to reply. There's an attach file option:

Snag_a8e137.png

Tom Sirgedas

unread,
Feb 20, 2022, 4:11:36 PM2/20/22
to Hadwiger-Nelson problem
Also -- I just made a way to generate DUAL files using javascript:

https://jsfiddle.net/70gwbtun/

The code creates the graph in the image below, but you can modify the code to make other graphs.

Snag_ad2acf.png

Яан Партс

unread,
Feb 20, 2022, 4:13:08 PM2/20/22
to Hadwiger-Nelson problem

attach.jpg

No such button!

понедельник, 21 февраля 2022 г. в 00:06:58 UTC+3, tsir...@gmail.com:

Яан Партс

unread,
Feb 20, 2022, 4:15:40 PM2/20/22
to Hadwiger-Nelson problem
I send my duals to you by e-mail (@gmail.com)

понедельник, 21 февраля 2022 г. в 00:13:08 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Feb 20, 2022, 4:41:53 PM2/20/22
to Hadwiger-Nelson problem
ok, i got your files and i can see the problem -- i'll take a look

Tom Sirgedas

unread,
Feb 21, 2022, 12:12:44 PM2/21/22
to Hadwiger-Nelson problem

Яан Партс

unread,
Feb 21, 2022, 2:57:18 PM2/21/22
to Hadwiger-Nelson problem
Thank you. It seems it works. Now only color number 9 has a special status?

понедельник, 21 февраля 2022 г. в 20:12:44 UTC+3, tsir...@gmail.com:

Яан Партс

unread,
Feb 21, 2022, 3:26:58 PM2/21/22
to Hadwiger-Nelson problem
Should your changes work correctly for annulus coloring? On some numbers of colors, I still have a noticeable discrepancy with the results of calculations in the optimization program. The difference reaches 0.008.

понедельник, 21 февраля 2022 г. в 22:57:18 UTC+3, Яан Партс:

Tom Sirgedas

unread,
Feb 21, 2022, 9:58:42 PM2/21/22
to Hadwiger-Nelson problem
Yeah, only color 9 has a special status (it's the null color). Though, the bug wasn't related to colors, but something very subtle with how vertices are enumerated.

Can you send me a graph and what value you expect? I can take a look. It might be that this simulator is currently only considering vertex-vertex distances and not vertex-line distances.

Tom Sirgedas

unread,
Feb 22, 2022, 8:40:03 PM2/22/22
to Hadwiger-Nelson problem
OK version 5 of the simulator is here: https://drive.google.com/file/d/1dreKmqkja_3watsf6_y0rOdKHRgNWqTk/view?usp=sharing

Changes:

- Search 9 neighbors deep for near-far constraints (instead of 5)
- new option to draw Zones of Exclusion for tiles of a specific color
- new feature: use mouse wheel to zoom in/out -- may be good for examining Zones of Exclusion closely

Because of the first change, the simulator may run slower -- it's now enforcing a lot more constraints than before. Most of the constraints are irrelevant and don't need to be checked frequently.

Tom Sirgedas

unread,
Feb 22, 2022, 9:28:32 PM2/22/22
to Hadwiger-Nelson problem
I made a version 6 here:

Changes:

- the simulation performs 250 iterations before updating the user interface instead of 50
- if a particular constraint is never violated during the 250 checks (iterations), it will be checked only ~1% of the time, until it is violated again

These changes seem to improve the simulation speed nicely. Less time is needed to converge on the same solution.

Яан Партс

unread,
Feb 23, 2022, 12:28:10 PM2/23/22
to Hadwiger-Nelson problem
Very great! Thank you. 
Some questions still remain (see Polymath blog). But I need to check my results.

среда, 23 февраля 2022 г. в 05:28:32 UTC+3, tsir...@gmail.com:
Reply all
Reply to author
Forward
0 new messages