Ideas for a physics or math programming project?

Click For Summary
The discussion revolves around seeking project ideas for a programming class focused on physics or mathematics, emphasizing the need for a significant and challenging application rather than basic calculations. Participants suggest that the project should align with the original poster's interests and programming experience, with examples like implementing density functional theory (DFT) or solving complex puzzles. There is also a mention of a collaborative effort to solve a "dog scramble puzzle" using C#, highlighting the challenges of algorithm development and problem representation in programming. The conversation encourages the original poster to clarify their interests and skills to receive tailored suggestions. Engaging in a project that combines computing with physics or math can lead to valuable learning experiences.
JorgeM
Messages
30
Reaction score
6
Hello!

I am going to make a project for my programming class.
So I am just looking for some ideas about what can I make my project about. I mean, I try to make something that would have an special significance for PHYSICS or even MATH (Modeling or solving) , and something that would be a challenge for myself and really represent the really advantages of using computing resources (Not something like a calculator for parabolic movements or whatever).
I can use most of the programming languages .
Hope that you would help me because I haven´t realized yet something interesting... :/
Thanks for your advice.

JorgeM.
 
Technology news on Phys.org
Welcome to the PF. :smile:

Can you share some of you initial ideas so far? What areas of Physics and Math interest you the most? It's hard to make suggestions without knowing more about your interests, and your experience with various numerical methods used in modeling software...
 
  • Like
Likes QuantumQuest and scottdave
What type of application is it supposed to be... a program that somebody would run and give some inputs? A real time simulation? An app that somebody can install on their phone?
 
What ideas for deciding on a programming project, from my own viewpoint, depends on your own actual-life experiences, especially if you have worked in a job. When life comes at you and YOU want a good efficient way to handle information or data, then you imagine your own goals or aims or objectives for what YOU want to be able to do.

My own experience was only very very slight regarding computer programming and I only knew some BASIC. I only had ONE introductory course formally and nothing more - NOTHING MORE! Three decades after graduating, I finally came up with and created a word-lister and word-frequency categorizing program, but nobody asked me for it. It was just an idea that came to me while I had briefly returned to school for an isolated semester while taking a culture&humanities course. I also created a lab-session time counter, text-menu controlled which would take user input of lab time for each lab session attended and count the time in hours - meant for individual student-as-user usage. (The idea was to be able to keep track of lab-time and count it all, in case the institution itself did not count the lab time correctly - and at the time, I did not know how to do this with Excel).

I should also include that about two decades after graduating, I spent time relearning BASIC in a somewhat popular , easy-to-learn form of BASIC with the help of a online community and some of its tutorials and a couple of OLD books on BASIC. This relearning itself took a few years. I needed to do this new and re-learning before I could create some useful programs. (The form of BASIC works in Windows.)
 
Well, you should be more specific about what you want. For example, what's your level? What's the programming class about?
You can get some ideas from my blog: https://compphys.go.ro
The described projects are open source and available on GitHub.

There are a lot of things you could do, depending on your level. Just a couple of hints, among countless possibilities:

Implement DFT with pseudo-potentials to compute a molecule.
Use tight-binding to compute bands in some solids.
 
Some of my friends and I are currently working on solving a “dog scramble puzzle” using C#. The puzzle is a commercially available item available on Amazon. The puzzle features 9 squares laid out in tic- tac-tie fashion. There are upper and lower halves of 4 different dog breeds, one along each edge of each square. The idea is to lay the squares out so that upper and lower halves of the dogs match up on all adjacent edges. The answer to this puzzle is unique, and there are 10s of billions of possible layouts, so working out a direct explicit algorithm is challenging.
 
  • Like
Likes JorgeM
You might scan through the computer questions in this forum and see if there is someone working on a problem that you can help with. Contact them and see if they can use some help, but make sure that you are ready to put in the effort that they will expect.
 
Chestermiller said:
Some of my friends and I are currently working on solving a “dog scramble puzzle” using C#. The puzzle is a commercially available item available on Amazon. The puzzle features 9 squares laid out in tic- tac-tie fashion. There are upper and lower halves of 4 different dog breeds, one along each edge of each square. The idea is to lay the squares out so that upper and lower halves of the dogs match up on all adjacent edges. The answer to this puzzle is unique, and there are 10s of billions of possible layouts, so working out a direct explicit algorithm is challenging.
There were several puzzles like that years ago and I wrote a Perl program to solve them. I don't know if I still have it.

PS. I just looked up the program and the first test case was a dog puzzle. I bet it's the same one. Looking at the code, I now wish that I had documented it better.
 
Last edited:
Post #4: I misunderstood. Question was about Physics or Mathematics programming.

I made a prime-number factorization program, many years ago.
 
  • #10
Maybe something to do with optics? Since your profile information says, "Favorite Area of Science: Optics/Computing".
 
  • #11
Chestermiller said:
Some of my friends and I are currently working on solving a “dog scramble puzzle” using C#. The puzzle is a commercially available item available on Amazon. The puzzle features 9 squares laid out in tic- tac-tie fashion. There are upper and lower halves of 4 different dog breeds, one along each edge of each square. The idea is to lay the squares out so that upper and lower halves of the dogs match up on all adjacent edges. The answer to this puzzle is unique, and there are 10s of billions of possible layouts, so working out a direct explicit algorithm is challenging.
For me, the hardest part was representing the problem in a way that a computer language could deal with it. I would be interested in seeing how you end up doing it in C#. I can send you my Perl code if you like, but I need to add some comments first so that I understand what I did.
 
  • #12
FactChecker said:
For me, the hardest part was representing the problem in a way that a computer language could deal with it. I would be interested in seeing how you end up doing it in C#. I can send you my Perl code if you like, but I need to add some comments first so that I understand what I did.
Before discussing this fun problem in detail, I would like to get some assurance from the OP that this will not be the project he selects. The last time this member was seen on PF was on Tues at 8 am. I'm hoping he will respond soon. Let's give him until Sunday, and, if he doesn't respond by then, we can begin to discuss. I will start a new thread called Dog Scramble puzzle.

Here is some background. My grandson is a junior in HS with a keen interest in computer programming. He has taught himself C#, and has lately been solving some interesting problems involving extracting desired data out of online data bases. My son is a banking executive who has been learning R. I am new to this (my background is in Fortran), but they have been describing to me what they are doing in their codes, and my head has been spinning. So I decided to try to learn C# in order to better follow them. We all thought it would be fun to work on the Dog Puzzle in order to sharpen our skills on a focus problem. So my grandson and I each decided to try to solve it using C#, and my son decided to try to solve it in R.

I did not feel my C# skills were anywhere close to the level where I could attack the problem deterministically (I'm still struggling with the syntax), so I decided to try a random approach. My son solved it with R deterministically (and, might I add, very skillfully). My grandson has still to implement his attack on the problem, but he is currently working on converting my son's R program to C#.
 
  • Like
Likes FactChecker
  • #13
Chestermiller said:
My grandson is a junior in HS with a keen interest in computer programming. He has taught himself C#, and ... my head has been spinning.
Ha! Those young whipper-snappers really run rings around old people like me. I'm surprised that your son solved it with R. I can't imagine how. I would be very interested in that.
 
  • #14
FactChecker said:
For me, the hardest part was representing the problem in a way that a computer language could deal with it. I would be interested in seeing how you end up doing it in C#. I can send you my Perl code if you like, but I need to add some comments first so that I understand what I did.
Regardless of choice of language, a person at the beginning of learning programming might/would/should make a flow-diagram and convert this directly into code. I wonder if this method or technique has gone out-of-fashion?
 
  • #15
symbolipoint said:
Regardless of choice of language, a person at the beginning of learning programming might/would/should make a flow-diagram and convert this directly into code. I wonder if this method or technique has gone out-of-fashion?
I agree. However, in this example problem, I think that the trick is to represent the geometry of the cards and the pictures in a way that the computer can understand and work with. That is not the same as a flowchart of the code. Once I figure out how I represented the geometry, the code should be fairly straightforward.

PS. In deference to @Chestermiller 's request to not discuss this problem in too much detail now, I don't want to describe what I did at this time. And I don't know if my description would make much sense to anyone who has not seen the puzzle.
 
Last edited:
  • #16
Chestermiller said:
Before discussing this fun problem in detail, I would like to get some assurance from the OP that this will not be the project he selects. The last time this member was seen on PF was on Tues at 8 am. I'm hoping he will respond soon. Let's give him until Sunday, and, if he doesn't respond by then, we can begin to discuss. I will start a new thread called Dog Scramble puzzle.

Here is some background. My grandson is a junior in HS with a keen interest in computer programming. He has taught himself C#, and has lately been solving some interesting problems involving extracting desired data out of online data bases. My son is a banking executive who has been learning R. I am new to this (my background is in Fortran), but they have been describing to me what they are doing in their codes, and my head has been spinning. So I decided to try to learn C# in order to better follow them. We all thought it would be fun to work on the Dog Puzzle in order to sharpen our skills on a focus problem. So my grandson and I each decided to try to solve it using C#, and my son decided to try to solve it in R.

I did not feel my C# skills were anywhere close to the level where I could attack the problem deterministically (I'm still struggling with the syntax), so I decided to try a random approach. My son solved it with R deterministically (and, might I add, very skillfully). My grandson has still to implement his attack on the problem, but he is currently working on converting my son's R program to C#.
This backtracking algorithm scramble squares solution paper includes a Java implementation. That paper is referenced in this expository paper, which discusses graph-theoretic approaches to the problem more generally.
 
  • #17
sysprog said:
This backtracking algorithm scramble squares solution paper includes a Java implementation. That paper is referenced in this expository paper, which discusses graph-theoretic approaches to the problem more generally.
These papers pretty much give away the set-up methodology that both I and my son arrived at independently. So, the OP should stay away from looking at them if he ultimately decides to make this puzzle his project.
 
  • #18
Chestermiller said:
These papers pretty much give away the set-up methodology that both I and my son arrived at independently. So, the OP should stay away from looking at them if he ultimately decides to make this puzzle his project.
I think that's a good point -- perhaps it was a bit careless or hasty of me to post those links without observing your "Let's give him until Sunday" dictum, as FactChecker did, but I did label the first paper as a solution, and I don't think that my noting the problem to be susceptible to backtracking and graph-theoretic approaches is too much of a giveaway -- kudos to you and your son on solving the problem without such hints or references, and after your grandson follows suit, I'd be interested to see your followup post.
 
  • #19
aaroman said:
Well, you should be more specific about what you want. For example, what's your level? What's the programming class about?
You can get some ideas from my blog: https://compphys.go.ro
The described projects are open source and available on GitHub.

There are a lot of things you could do, depending on your level. Just a couple of hints, among countless possibilities:

Implement DFT with pseudo-potentials to compute a molecule.
Use tight-binding to compute bands in some solids.

Hello there!. I have seen your blog and has a lot of interesting projects. I am going to check if I can figure out how may I do some of these ones because it is the kind of things I would like to program as a phycicist . Anyways, I think the ones that you describe I am going to try for my own, not for the school.
I am going to check all the projects on weeckend and tell you what I would choose.
Thanks for your help!
 
Last edited by a moderator:
  • #20
Chestermiller said:
Before discussing this fun problem in detail, I would like to get some assurance from the OP that this will not be the project he selects. The last time this member was seen on PF was on Tues at 8 am. I'm hoping he will respond soon. Let's give him until Sunday, and, if he doesn't respond by then, we can begin to discuss. I will start a new thread called Dog Scramble puzzle.

Here is some background. My grandson is a junior in HS with a keen interest in computer programming. He has taught himself C#, and has lately been solving some interesting problems involving extracting desired data out of online data bases. My son is a banking executive who has been learning R. I am new to this (my background is in Fortran), but they have been describing to me what they are doing in their codes, and my head has been spinning. So I decided to try to learn C# in order to better follow them. We all thought it would be fun to work on the Dog Puzzle in order to sharpen our skills on a focus problem. So my grandson and I each decided to try to solve it using C#, and my son decided to try to solve it in R.

I did not feel my C# skills were anywhere close to the level where I could attack the problem deterministically (I'm still struggling with the syntax), so I decided to try a random approach. My son solved it with R deterministically (and, might I add, very skillfully). My grandson has still to implement his attack on the problem, but he is currently working on converting my son's R program to C#.
Hi! I am here. Friday at 11:05 am. Your project sounds really interesting because of the fact that when the computer solve something like that it starts to show how much a computer can do. Millions and millions of possibilities and the computer does not care about it. I would like to take part of this challenge as project!
 
  • Like
Likes FactChecker
  • #21
symbolipoint said:
Post #4: I misunderstood. Question was about Physics or Mathematics programming.

I made a prime-number factorization program, many years ago.
Thanks for your advise! . I have already made one of this a couple months ago as homework
 
  • #22
JorgeM said:
Hi! I am here. Friday at 11:05 am. Your project sounds really interesting because of the fact that when the computer solve something like that it starts to show how much a computer can do. Millions and millions of possibilities and the computer does not care about it. I would like to take part of this challenge as project!
OK. If you make that your project, we will refrain from discussing it here. The real challenge on this problem is to figure out how to solve it deterministically.
 
  • #23
The first program involving any math or science was a practical voltage or current source converter, too easy.
The last program involving math or science I did was a dice simulator, that gives you all possibilities for 2 and 3 die rolls. You can enter (only valid) pairs of tuples or triples that represent events and the program will calculate the probability and print them, or for sums, you can also "roll" the dice as many times as you want and outcomes are printed, some other concepts of variance, averages are also included.
I think you can try that, as it is relatively simple set theory and programming, though creating the sample space was the hardest part for me, everything else is fairly straightforward. The knowledge of data structures, data types and algorithms is essential but most things can easily be outsourced to external libraries or utils and people think they know programming and informatics based on them hehe.
TDAF92Q.png

Other simple solutions, just apply any mathematical algorithm or formula, eg SLEs, differential equations, force additions using phasors, etc.
 

Attachments

  • TDAF92Q.png
    TDAF92Q.png
    4.1 KB · Views: 1,573
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
86
Views
2K
Replies
38
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K