We can easily find commutative binary operations on a 2 element set from the truth table (if ab=ba then the operation is commutative, thus there are 8 commutative binary operations in a 2 element set).  Is there a similar method or algorithm to find how many and what are the associative binary operations in a 2 element set?  If there isn't a way to quickly check, we would need to test all 8 possible inputs independently (if not commutative) and only 4 (if commutative) - which is still a lot for a 2 element set - 96 total (16 operations, 8 are commutative, so 8*4+8*8=96).  A generalization to an n-element set be very helpful.
Suppose we have a set  $S=\{a,b\}.$ Obviously, the total number of binary operations on $S$ is the number of all the pairs such that $$*(a,b)=a \, \text{or}  \, b,$$ which gives  $ 2 \cdot 2 \cdot 2 \cdot 2=2^4$ possible ones. Is there a way to find which of these $16$ binary operations are associative without writing all the operation matrices and checking it by hand?
css class definition with multiple identifiers I'm having a difficulty in finding one way car rentals from Alaska, which I can return in Seattle.  Do all the main rental agencies restrict such one-way rentals, as they involve crossing through Canada, before entering the lower 48 states? I know in TNG that all computer interfaces are now touch-screen, and that got me thinking: when was the first reference to touch-screen computer interfaces in Sci-Fi made? Redirect everything from old domain to new domain I need to (permanent) redirect all of the following:   www.example.com www.example.com/folder sub.example.com sub.example.com/folder   Basically, all URLs that are reachable without being intended to: www.new-example.com, I want to do this within Apache and using the mod_rewrite module via the .htaccess file. What does the word "SARGable" really mean? SQL query or method to list all sql services running This might be a simple one, but i searched a lot and unable to find one.  Is there a sql query or a way i can run on registered server to find the list of all sql related services running like, ssis , ssas, ssrs, sql, agent, broswer, etc...  Tried googling out and can find sys.dm_server_services dmv but it does not show all the services running How do I call a Scala Object method using reflection? How can one rig a Stirling engine? (Piston) I've only done a very little animation and rigging before, and I keep getting stuck trying to rig the pistons and rotor of the Stirling engine I built.     What should happen is that one piston moves in as the other moves out, and through the attached arms, the rotor should spin. Animating the rotor and the piston heads was easy enough, but getting the arms that go from the piston heads to the end of the shaft arm to move right endlessly confuses me.   Each end of each arm moves differently over the course of a cycle. With animating, I can't figure out how to interpolate so the arms stay where they should.  With armatures, I have tried for a while, but keep getting stuck when it comes to how to have one end of a bone moving in a circle while the other end is moving in a straight line.  Edit: The answer below elegantly resolved my problem, so i've updated this with the finished .blend file in case it's useful someone else.   Here is the .blend file: Apache and systemd I've just started using Debian 8 which has introduced systemd. I'm not interested in the politics around SysV vs systemd, but I am confused, especially around Apache (2.4).  There are now two ways to restart apache:   apache2ctl restart or apache2ctl graceful systemctl restart apache2 and it seems systemctl restart apache2.service does the same thing.   And they appear to do different things(!). I don't understand the difference.  I seem to need to do both to get a proper full restart working. e.g. after changing a config file for the php module it only noted the change after both.  Another time when apache2ctl configtest was failing and the failure was reported in systemctl status apache2 I fixed the config so that the first of these commands was happy, restarted with apache2ctl restart but the systemd status command still listed it as not running and with the old config problem.  I promise to spend ages reading about systemd (RTFM) in depth at some point, but meanwhile on a practical level relating to apache, I'd appreciate advice. "On their back" or "on their backs"? After the therapy, eight children (43%) became able to crawl/move on their back.   Or should I use "on their backs"?   Singular because each child only has one back, or plural because we're dealing with eight backs? Question of remainder on dividing by 7 Question :  What is the remainder when   $$ 10^{10} + 10^{10^2} +10^{10^3} + \ldots + 10^{10^{100}} $$  is divided by $7$? I'm trying to update an existing Subscriber in the All Subscriber Table through the API; i've set up the AppId in the App Center and have connected and created Subscribers, but i'm still having issues updating.  What call do I need to be making to do this? These are the ones i've been trying. "going to" definition, does it imply intent? I have had a debate with one of my friends about this little game:  "1 rabbit saw 9 elephants while going to the river. Every elephant saw 3 monkeys going to the river. Each monkey had 1 tortoise in each hand. How many animals are going to the river?"  Answers:   4 - if you could rabbit and monkeys (which are described as "going to" the river)  10 - if you are counting tortoises in monkeys' hands 19 - if you assume all   my argument is that the tortoises are not "going to", but are being either "taken to" or "move towards" river. That's what I would say if someone holds me and goes to the river.  my friend's argument is that because they move towards the river, they are "going to" the river. he gave example of me being in the car.  Me: If I don't intend to go there, I'm being "taken to", even if in the car.  Question: does "going to" implies intent of the subject ? Inner Product on $\mathbb{R}$ and on $\mathbb{C}$ This is a question of the book Linear Algebra of Kenneth Hoffman.  Describe explicitly all inner products on $\mathbb{R}$ and on $\mathbb{C}$.  I think that if $&lt;,&gt;$ is one inner product on $\mathbb{R}$ (or $\mathbb{C}$) then $&lt; ,&gt;=K[,]$, where $[,]$ is the standard inner product. Is that correct? How do I get $\cos{\theta} \lt \frac{\sin{\theta}}{\theta} \lt 1$? Top Answers in network profile shows incorrect score post of mine has a score of 13, but the  shows that it has 14:  This seems to be a recur of  bug; @Catija's  says it's been fixed.  Can we fix that (again)? How do I syntax check a Bash script without running it? Is it possible to check a bash script syntax without executing it?  Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts? What is difference between int.class and Integer.TYPE in java? Custom kernel: fails to load firmware when module built-in I'd like to have all my modules built-in, but this fails with iwlagn:  iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found!   The microcode file exists in /lib/firmware and the whole thing works just fine if I compile iwlagn as module. I have no idea where it's looking for the file or what's wrong - any ideas? How to create a scope? I'd like to create a custom scope that searches and returns results from an online source for personal use.  Is this possible? And if so, how?