There are many programming languages that do string pattern matching, either using regular expressions or using more elegant and powerful mechanisms, like SNOBOL[^].
There are also many programming languages that do tree pattern matching, like Haskell, but you cannot easily write a pattern that attempts to match an element in a list (a right descending tree), unless it is the first element.
Many tasks involve complex, irregular and not very large structured data. The most appropriate programming languages for tackling such tasks should have this kind of pattern matching in their tool box.
Examples of application domains for such a language:
HTML/XML validation and correction
C++ source code analysis
Analysis of email chains
Automatic chaining of tools in a workflow
Transformation from syntax to semantics in natural language processing
Starting in the eighties, I have made and maintained such a language, Bracmat (GitHub[^],Rosetta Code[^]), and I have used it for all purposes listed above. Problem is, it is not an established programming language and therefore not the right language for production software, so I'm looking for a replacement.
I hope that I am too pessimistic and that there are in fact programming languages with seizable user communities that support the pattern matching facilities that I am looking for. The programming language that I am looking for should have a pattern matching mechanism that:
allows wild cards not only in the tail part of a pattern, but anywhere in a pattern,
in the case of matching against a list, is capable of matching any number of consecutive elements anywhere in the list, and not just the 'head' of the list,
is visually clean, attractive and readable,
allows 'normal' instructions to be embedded in patterns (evaluation of variables, writing to files, function calls, other pattern match operations, etc.),
can assign a matched part of the subject to a variable,
can match part of a subject with the content of a variable,
uses the same pattern syntax for string pattern matching by treating a string as a special case of a list.
It goes without saying that such a language should have data types to express trees and lists. Ideally, patterns are structured as the data they are meant to match, so it would be helpful to implement patterns as data structures themselves.
Indeed. Bracmat would have been a better programming language if I had been a computer scientist. For software that is going to be maintained by others, Bracmat is currently not a solution. That is why I am looking for a community driven programming language that has pattern matching (on strings, lists, trees, see the list above) in its tool box.
Neither Perl or Scala can solve this simple problem with a simple pattern: Given a list of pairs, each pair consisting of a first name and a family name, give me two names of different persons that have the same family name. I think <a href="Tom[^] (a cousin of Scala, I think) can do it, but the syntax of patterns in that language is very verbose. In Bracmat, you would do:
I am not sure if i am in the rite place for this question but i want to know if it is possable to create an algorithm based around a name or a word.
The end result for this is to create a unique aesthetic logo derived from an object which can be 3d printed and doesnt look like complete chaos.
If anyone can point me in the rite direction or answer my question it would be a great help. I am a complete novice and have little to know idea what i am talking about so try not to be too wordy in your explinations.
I am a complete novice and have little to know idea what i am talking about so try not to be too wordy in your explinations.
Understanding or knowing the problem is the first solution. So define exactly what your aims are and will guide you. . I don't get the part "create an algorithm based around a name or word",please clarify.
“Everything is simple when you take your time to analyze it.”
Your problem seem to exists of creating 90 or 180 degree angles between all your lines? I dont think theres an algorithem for that. Personally I would do something different, like holding down the shift hey to only allow 90 degree bends: WPF-Drawing Canvas Control[^]
What about creating a grid and moving every point to the nearest valid position? This raises a problem when two points are almost in line, but unfortunately fall into diffferent grid lines. This special case would have to be taken care of manually (and checked after each point aligment performed, as the situation is going to change in time).
Consider a complete binary tree with an odd number of nodes. Let n be the number of internal nodes (non-leaves) in the tree. Define the internal path length, I, as the sum, taken over all the internal nodes of the tree, of the depth of each node. Likewise, define the external pathlength, E, as the sum, taken over all the leaves of the tree, of the depth of each leaf. Show that E = I + 2n
Can some one guide me for the above subject line I greatly appreciate Thanks in Advance...
Upcoming (next week!) is the First Anniversary Session of Caltech's online Machine Learning course (http://work.caltech.edu/telecourse[^]) . It is also the final session. There will be no future sessions. The course has attracted more than 200,000 participants since its launch last year, and has gained wide acclaim. This is the last chance for anyone who wishes to take the course. I took this course last fall and I highly recommend this! It is well done, with video lectures on YouTube (so you don't need to "attend" at a specific time). There is an on-line forum for discussion with Teaching Assistant(s) and other participants. The text is an excellent book (a good value on Amazon).
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
I was rather thinking of going commercial, I made the videos because people wanted to see what I was working on.Right now I'am making android apps using the same technology, they will be on Google Play in about two months time from now.
“Everything is simple when you take your time to analyze it.”
I know that the Traveling Salesman Problem has a solution space of (n-1)! / 2 for n = nodes, when the symetrick TSP is considered.
But, is there any mathematical way to show how big a solution space a Arc Routing Problem, like the Capacitated Arc Routing Problem have? Or any other way to show (describe) why ít is a complex problem?
In all the literature it is only described as NP-hard, and thats it.
The standard way to show a problem is NP is to show that it reduces to a known NP problem. In other words, you show transformations (which must run in P (polynomial) time) that transform any instance of the problem to an instance of a known NP problem.
Last Visit: 31-Dec-99 19:00 Last Update: 23-Feb-17 14:24