• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Graph algorithms to solve easier programming problems

 
Ranch Foreman
Posts: 266
12
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering If Neo4J could be used for small and limited, easier programming problems? I mean, not AI or database related?
 
Greenhorn
Posts: 3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What sort of things do you have in mind? I think you could use it to solve some programming problems, although I'm not sure that it'd be a better choice than a general programming language.
 
D.J. Quavern
Ranch Foreman
Posts: 266
12
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
I am thinking about a few programming puzzles I posted on different forum, such this one: https://coderanch.com/t/716816/java/Chess-calculating-intersection-point-bishops
I know that besides my ugly solution, this problem has a graph solution.
Problem is I am quite scared of graphs to start working with them. The presentation I saw of Neo4J was very engaging, even if it was more oriented towards databases solutions. I was wondering if I could model easy questions such as the one I linked.
 
Mark Needham
Greenhorn
Posts: 3
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure exactly how it'd work for that problem, but if you can think of a way to model the problem in a way that uses a graph then it would certainly be possible to write a query over it to solve the problem.

The closest thing I can think of is this blog post, which shows how to solve a Rubiks Cube using Neo4j - https://medium.com/@jeffprod/r%C3%A9soudre-un-rubiks-pocket-cube-avec-une-base-de-donn%C3%A9es-orient%C3%A9e-graphe-fbab913d7a32
 
Author
Posts: 13
1
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi D.J.

Graphs aren't scary once you get to know them. They are actually immensely fun. I have 3 Neo4j recommendations:

1) Neo4j has some free online tutorials so you can get a level set of the basics: https://neo4j.com/graphacademy/

2) Then the Sandboxes!  https://neo4j.com/sandbox-v2/
Anyone can spin up a free sandbox that is hosted online with pre-loaded data. This was my first introduction to Neo4j and it was great because I knew there was no way I could break anything. Also, because you have preloaded data and some tutorials (click button -> auto-runs a query) you have some basics built in that you can then change. There's an algorithm one built on Game of Thrones, your own Twitter account, and some serious ones like crime investigation.

3) And if you just need inspiration, try the GraphGists which are example graphs that developers share online: https://neo4j.com/graphgists/

Please have fun!
 
D.J. Quavern
Ranch Foreman
Posts: 266
12
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark! Hi Amy!

Amy Hodler wrote:Hi D.J.

Please have fun!



How can I resist that directive   !
Thank you very much for the links, I will do!
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!