mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2018-10-10, 03:08   #34
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

Quote:
Originally Posted by Batalov View Post
Found one!
Good work!

Once again, I am trying to overcome poor code with more cores, (even though that approach failed for the bonus in July). I still have a few days. (Yep, I kept thinking that in July, too.)


Edit: I have written and compiled my program with debug under Code::Blocks in C++ and am running it via ./<program> in a linux terminal. It seems that I have read that you can break in with CTRL+C, check variable values and then continue the program from where it was interrupted. Is this possible without running it under something like GDB?

Last fiddled with by EdH on 2018-10-10 at 03:16 Reason: To ask a question.
EdH is offline   Reply With Quote
Old 2018-10-10, 13:25   #35
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

4,643 Posts
Default

Quote:
Originally Posted by Batalov View Post
Found one!
Congratulations!

I've pretty much drawn a blank on this one.

Yes, I understand what the question is. I simply had no practical insight into the problem. I did devise an approach which in theory, could generate sets of any number of points with the required properties, but saw no way to write code that would implement the approach.

To me, the most interesting thing about the problem was that the sets in question could be translated by any vector [a, b] with integer coordinates, or multiplied by any 2x2 matrix with determinant 1 or -1, and the resulting set would define triangles with the same areas as the original set.

Beyond the restrictions already described in this thread, I will mention that the area of the smallest rectangle containing the set is at least twice the area of any triangle in the set.
Dr Sardonicus is offline   Reply With Quote
Old 2018-10-10, 15:00   #36
uau
 
Jan 2017

32·11 Posts
Default

Quote:
Originally Posted by EdH View Post
Edit: I have written and compiled my program with debug under Code::Blocks in C++ and am running it via ./<program> in a linux terminal. It seems that I have read that you can break in with CTRL+C, check variable values and then continue the program from where it was interrupted. Is this possible without running it under something like GDB?
No, unless your program implements explicit signal handlers, CTRL+C will kill the process and there will be nothing left to inspect. CTRL+Z can be used to temporarily stop a program without killing it, but that doesn't help with inspecting variables. Without running the program under gdb or some other debugger (or later attaching gdb to a program that has been started separately) there's no way to inspect its internal state. How would you even attempt to do that without a tool?
uau is offline   Reply With Quote
Old 2018-10-10, 23:03   #37
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

Thanks uau. That's what I expected. I guess the stop and restart using CTRL-Z was what I had seen, but didn't know if there may have been a way to interrogate variables.
EdH is offline   Reply With Quote
Old 2018-10-10, 23:15   #38
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default

Quote:
Originally Posted by EdH View Post
Thanks uau. That's what I expected. I guess the stop and restart using CTRL-Z was what I had seen, but didn't know if there may have been a way to interrogate variables.
print the variable names and values ?
science_man_88 is offline   Reply With Quote
Old 2018-10-11, 03:35   #39
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

EE916 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
print the variable names and values ?
Too much overhead to print thousands per second (or check for the passage of thousands to trigger printing), and I'd only want to do a spot check once in a while.
EdH is offline   Reply With Quote
Old 2018-10-11, 20:33   #40
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Lightbulb

Apparently there exist a solution with S<=567 (?!).
Batalov is offline   Reply With Quote
Old 2018-10-11, 20:36   #41
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

22×7×167 Posts
Default

Quote:
Originally Posted by EdH View Post
Too much overhead to print thousands per second (or check for the passage of thousands to trigger printing), and I'd only want to do a spot check once in a while.
Keep a counter and just print every xMillion iterations?

Or "watch" for a key-press and print out only then "on-command"

Last fiddled with by petrw1 on 2018-10-11 at 20:37
petrw1 is offline   Reply With Quote
Old 2018-10-11, 20:38   #42
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,171 Posts
Default

Quote:
Originally Posted by Batalov View Post
Apparently there exist a solution with S<=567 (?!).
There is nothing on the web site still, or did you find that?
bsquared is offline   Reply With Quote
Old 2018-10-11, 20:40   #43
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Hit 'refresh', I guess. A pair of solvers have an asterisk (and they ain't me :-( )
Batalov is offline   Reply With Quote
Old 2018-10-11, 20:42   #44
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

467610 Posts
Default

Quote:
Originally Posted by Batalov View Post
Hit 'refresh', I guess. A pair of solvers have an asterisk (and they ain't me :-( )
I see you and I see a pair of solvers with an "*" but nothing on the page that says what earned the "*"
petrw1 is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
October 2017 Xyzzy Puzzles 9 2017-11-07 15:18
October 2016 R. Gerbicz Puzzles 10 2016-11-01 13:35
October 2015 LaurV Puzzles 3 2015-11-02 15:22
October 2014 Xyzzy Puzzles 8 2014-11-02 19:03
13 October is approaching! Joe O Prime Sierpinski Project 1 2010-10-09 06:12

All times are UTC. The time now is 03:38.


Sat Jul 17 03:38:00 UTC 2021 up 50 days, 1:25, 1 user, load averages: 1.21, 1.67, 1.62

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.