C/++/# Ideas for a physics or math programming project?

  • Thread starter JorgeM
  • Start date
22
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.
 

berkeman

Mentor
55,747
5,823
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...
 

scottdave

Science Advisor
Homework Helper
Insights Author
1,633
619
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?
 

symbolipoint

Homework Helper
Education Advisor
Gold Member
5,659
939
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.)
 
48
9
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.
 
19,357
3,839
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.
 

FactChecker

Science Advisor
Gold Member
2018 Award
5,090
1,792
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.
 

FactChecker

Science Advisor
Gold Member
2018 Award
5,090
1,792
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:

symbolipoint

Homework Helper
Education Advisor
Gold Member
5,659
939
Post #4: I misunderstood. Question was about Physics or Mathematics programming.

I made a prime-number factorization program, many years ago.
 

dlgoff

Science Advisor
Gold Member
3,729
1,629
Maybe something to do with optics? Since your profile information says, "Favorite Area of Science: Optics/Computing".
 

FactChecker

Science Advisor
Gold Member
2018 Award
5,090
1,792
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.
 
19,357
3,839
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#.
 

FactChecker

Science Advisor
Gold Member
2018 Award
5,090
1,792
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.
 

symbolipoint

Homework Helper
Education Advisor
Gold Member
5,659
939
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?
 

FactChecker

Science Advisor
Gold Member
2018 Award
5,090
1,792
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:
716
326
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.
 
19,357
3,839
716
326
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.
 
22
6
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 gonna 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 gonna try for my own, not for the school.
I am gonna check all the projects on weeckend and tell you what I would choose.
Thanks for your help!
 
Last edited by a moderator:
22
6
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!
 
22
6
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
 
19,357
3,839
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.
 
34
17
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

Last edited:

Want to reply to this thread?

"Ideas for a physics or math programming project?" You must log in or register to reply here.

Related Threads for: Ideas for a physics or math programming project?

Replies
5
Views
5K
Replies
6
Views
1K
Replies
11
Views
1K
Replies
1
Views
584
Replies
9
Views
871
  • Posted
Replies
5
Views
2K
Replies
1
Views
2K
Replies
4
Views
3K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top