Hi, if you're reading this, thanks for taking the time to help me with this.
I have been given an assignment in which I need to remake the game Reversi/Othello in MatLAB using an 8x8 matrix where black is 1 and white is -1, and have a functional GUI.
I have been able to do the GUI etc, by myself, but when I reach the point where I need to allow for only valid moves, I become a little stuck.
I was curious if any of you would know of a way in which that could be done, because I've hit a road block. Essentially I need to scan all 8 directions of the matrix from the centre point, and find a valid combination of player_number*-1, in a row which end in a player_number (where player_number is the current players turn), but I am not sure how to accomplish this.
Imagine that I use to explore with my mind a particular topic and I want to map and model the mechanics of that exploration. That's mostly metaphysical. I have a partner called "name a programming language" with whom I must communicate in its terms. Which would be that best programming language, and which would be the basics that I must "know" in order to pass my ideas to him properly? Since I'm a philosopher, with this I mean using the elements of my natural language skills that match with the language syntax, and using them in the proper context, in order to "program" at the highest level possible. It's true that my program won't run yet but for me this is not an obstacle at all (yet), as when one writes a book one can start by writing the index. Some programmers will consider this index or highest level programming (so to speak) as mostly void stuff coz it lacks of the proper mathematical meat that the interpreter use to eat in order to do lots of things that look amazingly useful, and in a sense they are right. But that's not the point. The point is that as soon as I can I would start to dig deeper in that structure and build the proper meat that my highest level labels are still just naming. What if using my ability to name what I actually think and recognize the path of whichever method I call for my object of thinking, I'd like to start setting a context for further immersion (immersion with advanced mathematical notation and that? Somebody commented me about a couple of basic elements of mathematical notation which I'm familiarized with, like +, -, /, =, 1,2,3,4,5,6,7,8,9,0, (), etc. I think I know that any programming language has its set of keywords, and that there's also a proper way in which one must express structures in a given language, proper way which I'm not familiarized with but I'm able to learn. Does this sound possible?
For me, starting with a programming language is an affair of connecting with it. It's not about including it in me or including me in it, but a kind of symbiotic relationship. Unless for me, using my natural language as far as I can, but constrained (formalized) by the programming language's syntax in order to model using objects and describing methods and classes that are still unable to run (yet) seems to be a good starting point for a symbiotic relationship.
Understanding might depend on my ability to set myself in the shoes of another.
Any clue? This is a real goal that I'm looking to accomplish, so any question that would clarify a bit more my doubts will be highly appreciated.
I really hope someone here knows a bit about discrete math. Here's my problem:
A standard notation for the number of partitions of an n-element set into k classes is S(n, k). Because the empty family of subsets of the empty set is a partition of the empty set, S(0, 0) is 1. In addition, S(n, 0) is 0 for n > 0, because there are no partitions of a nonempty set into no parts. S(1, 1) is 1.
A) Explain why S(n, n) is 1 for all n > 0. Explain why S(n, 1)is 1 for all n > 0.
B) Explain why S(n, k) = S(n - 1, k - 1) + kS(n - 1, k) for 1 < k < n.
C) Make a table like Table 1.1 that shows the values of S(n, k) for values of n and k ranging from 1 to 6.