text:
Are there More Hard Objects or Soft Objects
Tangentially inspired by the opening to the What-If book.
The input is a rectangle of spaces as a string, list of string, etc., with objects made of #'s inside:
########
#      #
########

   ###        ####
   ###        ####
   ###

The objects will always be non-intersecting, non-touching, rectangles. A soft object is defined as an object that isn't filled up with #'s in the middle and is only a border, a hard object is one that is filled up. An object with width or height <=2 is considered hard. All objects are either hard or soft.
If there are more hard objects in the input, output "Hard", if more soft, output "Soft", if they are equal, output "Equal".
This is code-golf, so shortest code in bytes wins!
Test Cases
These cases aren't full inputs, but rather what each object should be characterized as. The actual input will be like the ascii-art at the top of the question.
Hard
#

####

##
##

##########
##########
##########

Soft
###
# #
###

###################
#                 #
#                 #
#                 #
###################

####
#  #
#  #
#  #
#  #
#  #
#  #
#  #
####

Actual Test Cases
########
#      #
########

   ###        ####
   ###        ####
   ###

Hard

###
###
###

###################
#                 #
#                 #
#                 #
###################

Equal

   ######
   #    #
   ######
          ###
   ##  #  # #
          ###

 ########
 #      #
 ########

Soft

Are the outputs strict, or can any 3 unambiguous outputs be used (such as H/S/E or -1/0/1)?

@trichoplax they are strict

Meta answer on cumbersome I/O formats (not to say you can't do what you choose, but just to give a place for people to express a more fine grained opinion if they wish).

@DLosc sure that's fine, adding.

@LuisMendo no, adding.

I assume that by "more hard objects" you mean the number (count) of hard objects, not (for example) the area of hard objects...

Perhaps add a couple of actual test cases?

Are all objects guaranteed to be either hard or soft?

@Maltysen I've added two examples in my answer. Feel free to use include them as test cases

Do we have to take the input as a single strings or can we take it as an array of rows?

@user2357112 yes, clarifying.

@Dennis either is fine: "string, list of string"

MATL, 105 104 58 50 49 bytes
Thanks to @Neil for a suggestion that allowed me to remove 46 bytes!
2\TTYaEq4:HeqgEqZ+K/Zot0>+ss'Soft Hard Equal'Ybw)

Input is a 2D char array, with rows separated by ;. The example in the challenge is
['########          ';'#      #          ';'########          ';'                  ';'   ###        ####';'   ###        ####';'   ###            ']

Here's another example:
['###                ';'###                ';'###                ';'                   ';'###################';'#                 #';'#                 #';'#                 #';'###################']

This corresponds to
###
###
###

###################
#                 #
#                 #
#                 #
###################

and thus should give 'Equal'.
As a third example, corresponding to 'Soft',
['   ######    ';'   #    #    ';'   ######    ';'          ###';'   ##  #  # #';'          ###';'             ';'             ';' ########    ';' #      #    ';' ########    ']

that is,
   ######
   #    #
   ######
          ###
   ##  #  # #
          ###

 ########
 #      #
 ########

Try it online!
Explanation
This uses 2D convolution to detect shapes. The input is converted to a 2D array with 1 indicating # and -1 for space; and is padded with a frame of -1 values. This assures that shapes at the edge of the original field are also detected.
A soft object is detected by the mask
 1   1
 1  -1

which corresponds to the object's upper-left corner with one empty interior point. Note that the convolution inverts the mask, so it is defined as [-1 1; 1 1] in the code. The number S of positions in which the convolution equals 4 is the total number of soft objects.
An object (soft or hard) is detected by the mask
-1  -1
-1   1

which correponds to the object's upper-left corner together with some empty exterior points. This mask is the negated version of the previous one, so the previous convolution result can be reused. Specifically, the number T of positions in which that result equals -4 is the total number of objects.
The number H of hard objects is T−S. The output string is determined by the sign of S−H = 2*S−T.
2\                 % Input. Modulo 2: '#' gives 1, ' ' gives 0
TTYa               % Add a frame of zeros
Eq                 % Convert 0 to -1
4:HeqgEq           % Generate mask [-1 1; 1 1], for soft objects
Z+                 % 2D convolution, preserving size
K/Zo               % Divide by 4 and round towards 0. Gives 1 or -1 for 4 or -4
t0>                % Duplicate. 1 for positive entries (soft objects), 0 otherwise
+                  % Add. This corresponds to the factor 2 that multiplies number S
ss                 % Sum of 2D array. Gives 2*S-T
'Soft Hard Equal'  % Push this string
Yb                 % Split by spaces. Gives cell array
w)                 % Swap. Apply (modular) index to select one string

So, I have no idea what a convolution is, but couldn't you just count all the objects (by finding e.g. the top left corner) and comparing with twice the number of soft objects?

@Neil that looks very promising, thanks! That way I could reduce from 5 to 2 convolutions. (A convolution is essentially seeing if a specific pattern matches at some position). I'll try it later

... or even just 1 convolution! Thanks a lot! 46 bytes off:-) @Neil

It was almost on par with JS ... @Neil which side are you on ;-)

JavaScript (ES6), 123 121 118 bytes
s=>s.replace(/#+/g,(m,i)=>s[i+l]>" "?0:n+=!m[1]|s[i-l+1]==s[i-l]||-1,n=l=~s.search`
|$`)|n>l?"Hard":n<l?"Soft":"Equal"

Saved 2 bytes thanks to @edc65!
Takes input as a multiline string padded with spaces to form a grid.
Explanation / Test
Very close to MATL length! Basically, it searches for the top line of #s of each object, and if the length of the top line is less than 2 or the first 2 characters below the top line are the same, it is hard, otherwise soft.

var solution =

s=>
  s.replace(/#+/g,(m,i)=>        // for each run of consecutive # characters
    s[i+l]>" "?                  // if the position above the match contains a #
      0                          // do nothing (this object has already been counted)
    :n+=                         // add 1 to the counter (hard) if
      !m[1]                      // the match is only 1 # wide
      |s[i-l+1]==s[i-l]          // or the characters below are the same
      ||-1,                      // else decrement the counter (soft)
    n=                           // n = counter, hard objects increase n, soft decrease
    l=~s.search`\n|$`            // l = (negative) line length
  )
  |n>l?"Hard":n<l?"Soft":"Equal" // return the result string

// Test
document.write("<pre>" + [`

########
#      #
########

   ###        ####
   ###        ####
   ###

`,`

###
###
###

###################
#                 #
#                 #
#                 #
###################

`,`

   ######
   #    #
   ######
          ###
   ##  #  # #
          ###

 ########
 #      #
 ########

`,`

########
#      #
########

   ###        ####
   # #        ####
   ###

`,`

########
#      #
########

   ###  ###   ####
   ###  # #   ####
   ###  ###

`,`

#

`,`

##

`,`

#
#

`,`

###
# #
###

`].map((test) => solution(test.slice(2, -2))).join("\n")
)

There seems to be a problem with single-line input; ### returns Equal.

@Dennis You're right. It seems that for single line input my previous code relied on the bug I fixed. Fixed now.

IMHO ~g.search(/$/m) is slightly more readable than ~g.search\\n`||-1`.

@Neil True. There was a bug so I hastily tacked ||-1 on to fix it, but your suggestion made me realise that adding |$ to the regex would save 2 bytes anyway. Thanks!

You could use just 1 counter n=l=... n>l?...:n<l?...:...

... and of course increment or decrement n

@edc65 Great idea, thanks!

Jelly, 50 49 46 43 38 34 33 32 bytes
Ḥ+ḊZ
>⁶ÇÇFµċ7_ċ4$Ṡị“¤Ỵf“¢*ɦ“¡⁺ƒ»

Try it online! or verify all test cases.
Background
There are 16 different 2×2 patterns of blocks and spaces:
|  |  |  | #|  | #| #|# | #|# |# |##|# |##|##|##|
|  | #|# |  |##| #|# |  |##| #|# |  |##| #|# |##|

Of these, since two objects will never touch,
| #|# |
|# | #|

will never occur in the input, leaving us with 14 possible patterns.
Assigning   a value of 0 and # a value of 1, we can encode a 2×2 pattern
|ab|
|cd|

as 2(2a + c) + (2b + d) = 4a + 2b + 2c + d, leaving the following values for the 14 patterns.
|  |  |  | #|  | #|# | #|# |##|# |##|##|##|
|  | #|# |  |##| #|  |##|# |  |##| #|# |##|
  0  1  2  2  3  3  4  5  6  6  7  7  8  9

For partial 2×1, 1×2 or 1×1 patterns at the lower and/or right border, we'll treat them as if the were padded with spaces, encoding them as 4a + 2b, 4a + 2c and 4a, respectively.
This way, each object (soft or hard) will have exactly one 4 pattern (its lower right corner); each soft object will have exactly two 7 patterns (its lower left and its upper right corner).
Thus, subtracting the amount of 4 patterns from the number of 7 patterns encountered in the input will yield (s + h) - 2s = h - s := d, where h and s are the amount of hard and soft objects they form.
We print Hard if d > 0, Soft if d < 0 and Equal if d = 0.
How it works
Ḥ+ḊZ                         Helper link. Input: M (n×m matrix)

Ḥ                            Unhalve; multiply all entries of M by 2.
  Ḋ                          Dequeue; remove the first row of M.
 +                           Perform vectorized addition.
                             This returns 2 * M[i] + M[i + 1] for each row M[i].
                             Since the M[n] is unpaired, + will not affect it,
                             as if M[n + 1] were a zero vector.
   Z                         Zip; transpose rows with columns.

>⁶ÇÇFµċ7_ċ4$Ṡị“¤Ỵf“¢*ɦ“¡⁺ƒ»  Main link. Input: G (character grid)

>⁶                           Compare each character with ' ', yielding 1 for '#'
                             and 0 for ' '.
  Ç                          Call the helper link.
                             This will compute (2a + c) for each pattern, which is
                             equal to (2b + d) for the pattern to its left.
   Ç                         This yields 2(2a + c) + (2b + d) for each pattern.
    F                        Flatten; collect all encoded patterns in a flat list.

     µ                       Begin a new, monadic link. Argument: A (list)
      ċ7                     Count the amount of 7's.
         ċ4$                 Count the amount of 4's.
        _                    Subtract the latter from the former.
            Ṡ                Yield the sign (1, -1 or 0) of the difference.
              “¤Ỵf“¢*ɦ“¡⁺ƒ»  Yield ['Hard', 'Soft', Equal'] by indexing into a
                             built-in dictionary.
             ị               Retrieve the string at the corresponding index.

Julia, 99 95 93 bytes
~=t->2t'+[t[2:end,:];0t[1,:]]'
!x=("Hard","Equal","Soft")[sign(~~(x.>32)∩(4,7)-5.5|>sum)+2]

! expects a two-dimensional Char array as argument. Try it online!
How it works
This uses almost exactly the same idea as my Jelly answer, with one improvement:
Instead of counting the amount of 4's and 7's, we remove all other numbers, then subtract 5.5 to map (4, 7) to (-1.5, 1.5). This way, the sign of the sum of the resulting differences determines the correct output.

TSQL, 328 249 bytes
Declaring variables and test data:
DECLARE @l int = 20
DECLARE @ varchar(max)=''
SELECT @+=LEFT(x + replicate(' ', @l), @l)
FROM (values
(' xxxx'),
(' xxxx'),
(' xxxx'),
('x'),
(''),
('xxx'),
('x x  xxx'),
('xxx  x x'),
('     xxx    ')) x(x)

Code:
SELECT substring('Soft EqualHard',sign(sum(iif(substring(@,N,@l+2)like'xx'+replicate('_', @l-2)+'x ',-1,1)))*5+6,5)FROM(SELECT row_number()OVER(ORDER BY Type)N FROM sys.all_objects)x WHERE n<=len(@)AND' x'=substring(@,N-1,2)AND''=substring(@,N-@l,1)

Code deflated:
SELECT
  substring('Soft EqualHard',
    sign(sum(iif(substring(@,N,@l+2)like'xx'+replicate('_', @l-2)+'x ',-1,1)))*5+6,5)
FROM(SELECT row_number()OVER(ORDER BY Type)N FROM sys.all_objects)x
WHERE n<=len(@)AND' x'=substring(@,N-1,2)AND''=substring(@,N-@l,1)

Explaination:
Script is scanning the text for the pattern:
      space
space x

Each of those is the start of a box
For those positions, the script is then checking for the pattern, don't need to check for first x:
  x
x space

When that exists it is a soft object, otherwise it is a hard object.


text:
How can I score challenges with variable problem sizes?

There is fairly strong support on meta for challenge-writing questions to be on topic on main, provided these questions are specific and answerable. However, we don't have any such questions yet, so I figured I'd test the waters. This question is probably entering good subjective, bad subjective territory, but I think that's likely what challenge-writing questions will have to be. To ensure that they still generate high-quality content, please don't just post wild speculative ideas in the answers. Explain why they avoid the problems mentioned below, or ideally point to existing challenges which have successfully used the suggested technique in the past.

For certain optimisation challenges, a free parameter in setting the challenge is the size of the problem to be optimised. By "optimisation challenge" I don't mean things like our fastest-code genre, where answers are usually required to be exact/optimal, and the challenge is scored either on a fixed problem size or on the largest problem size that can be handled in a fixed amount of time. I mean specifically challenges where suboptimal solutions to the underlying problem are allowed and even likely, and the goal is to do as well as possible.
For the sake of definiteness, consider busy beaver challenges, although in principle this applies to other challenge types without known optimal solutions as well (I'm just using busy beavers here because they exacerbate the problems mentioned below). Say, I wanted to make a challenge about finding the busiest Brainfuck beaver. The free parameter in busy beaver problems is the size of the code. I can't set the challenge without making reference to the code size in some way. In a way, each value of the problem-size parameter N gives a separate (increasingly difficult) challenge. My main question is how I can make such a challenge work without running into balancing problems.
The obvious solution is to fix N: "Find a terminating Brainfuck program with N bytes of source code which prints as many characters as possible/runs for as many ticks as possible." This has massive balancing issues: if I pick the size too small, someone might quickly find the busiest beaver and the challenge is over. If I pick the size too large, the optimal solution will print an astronomical amount of characters before terminating, which means that it will likely be trivial to find such programs and the challenge becomes a chore/exercise in patience — this also leaves the territory where busy beavers can be found programmatically, and instead people would need to start proving their results formally which a lot of people might not consider very fun. Of course, this problem is more pronounced in busy beaver challenges than other types, due to the growth of the optimal solutions, but it applies to other challenges nevertheless.
The next option would to leave N unconstrained and make it part of the scoring via some function. Even for "normal" challenges getting the balance of combined scores right is incredibly difficult, but in the case of busy beavers it's actually fundamentally impossible, due to the fact that optimal solutions grow faster with N than any computable function. That means I can always beat the best existing answer by going to a sufficiently large N where I can easily find a program that runs for so long that I can get a better score without much effort.
I have also considered setting a fixed N and allowing people to also submit beavers for larger N which will be used as successive tie breakers. This has a similar problem, in that someone can just "happen to find an equally good busy beaver" for a N, thereby creating a tie and then just submitting pretty much anything for the next N where finding a large score is easier (even if finding the optimal score gets harder). In these cases, how would you deal with multiple people using the same solution? Forbidding it would also be weird in case it's optimal.
Maybe one could strike a middle ground, by making an educated guess at a reasonable N and then asking for busy beavers for all sizes within (say) 5 bytes of N, so that there's some leeway in both directions (and then you combine the ~10 scores into a single one by one technique or another). This doesn't feel quite satisfactory either because my initial guess for N could still be widely off the range that makes for interesting challenges.
TL;DR: in cases where the challenge is to (suboptimally solve and) optimise a problem whose size is variable, how do I incorporate the size into the challenge? Ideally I would want people to be able to work with a value of N that is near the upper end of the range of tractable sizes. But just in case it turns out that optimal solutions are possible for that N, it would be great if solutions for slightly larger N would start to weigh in, such that the challenge could continue with a more interesting problem size.

I like this as a model for challenge-writing questions because it's not specific to PPCG. It's not "How should we do this?" but "What's a good way to do this?". I could imagine such challenges being run on a programming hobbyist site or at an in-person competition.

Put the tldr at the top!

@Majora320 ...but then change d to w :-)

Find the next N
The challenge would indicate an N that submissions should start at.
Then, people would submit answers at the current N.  If a given submission is proven to be optimal, then N is increased by 1, and the process repeats.
There are several ways to score this:

Score the best submission at the current N
Give a point to the best submission at the current N, plus a point for each optimal solution
Same as #2, but also give a point to the person that proved that a given submission was optimal.

Give points for solutions within a bounded N
Allow N to be within a fixed bounds.  The lower bound should exclude obviously trivial answers, and that the higher bound shouldn't be too far from the lower bound.
Then, give 1 point for each person that has the best solution for each N within the bounds.  If higher N means that the solution is harder, then give N points to them. (or some formula based on N).
This method is similar to how AZsPCs does it, but partial points aren't given.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Federal income tax calculator for procrastinators
Today is Tax Day!
Oops.
Well, today is tax day if you are a resident of Maine or Massachusetts.
So you're probably still completing your return and need a calculator for when you get to Line 44.
Given an input of taxable income (US$, accurate to 2 decimal places) and a string representing filing status, output the amount of tax (also US$ to 2 decimal places).
Filing status will be one of S, MFJ, QW, MFS, or HH for Single, Married Filing Jointly, Qualified Widow(er), Married Filing Separately or Head of Household, respectively.

Tax will be calculated according to the official tables in IRS Revenue Procedure 2014-61, section .01 Tax Rate Tables, Tables 1-4.  I have added these tables at the bottom of the question.
You may choose whatever rounding method you like, as long as the result is accurate to 2 decimal places.

Example Inputs:
0.00 S
10000.00 MFJ
100000.00 MFS
1000000.00 QW

Example Outputs corresponding to above inputs:
0.00
1000.00
21525.75
341915.90

Summary of tax tables.
Married Filing Jointly and Qualified Widow(er)

Income Interval       Tax
  [     $0,  $18450]                 10%
  ( $18450,  $74900]      $1845    + 15%   of the excess over  $18450
  ( $74900, $151200]     $10312.50 + 25%   of the excess over  $74900
  ($151200, $230450]     $29387.50 + 28%   of the excess over $151200
  ($230450, $411500]     $51577.50 + 33%   of the excess over $230450
  ($411500, $464850]    $111324    + 35%   of the excess over $411500
  ($464850,      $∞]    $129996.50 + 39.6% of the excess over $464850

Head of Household

Income Interval       Tax
  [     $0,  $13150]                 10%
  ( $13150,  $50200]      $1315    + 15%   of the excess over  $13150
  ( $50200, $129600]      $6872.50 + 25%   of the excess over  $50200
  ($129600, $209850]     $26722.50 + 28%   of the excess over $129600
  ($209850, $411500]     $49192.50 + 33%   of the excess over $209850
  ($411500, $439000]    $115737    + 35%   of the excess over $411500
  ($439000,      $∞]    $125362    + 39.6% of the excess over $439000

Single

Income Interval       Tax
  [     $0,   $9225]                 10%
  (  $9225,  $37450]       $922.50 + 15%   of the excess over   $9225
  ( $37450,  $90750]      $5156.25 + 25%   of the excess over  $37450
  ( $90750, $189300]     $18481.25 + 28%   of the excess over  $90750
  ($189300, $411500]     $46075.25 + 33%   of the excess over $189300
  ($411500, $413200]    $119401.25 + 35%   of the excess over $411500
  ($413200,      $∞]    $119996.25 + 39.6% of the excess over $413200

Married Filing Separately

Income Interval       Tax
  [     $0,   $9225]                 10%
  (  $9225,  $37450]       $922.50 + 15%   of the excess over   $9225
  ( $37450,  $75600]      $5156.25 + 25%   of the excess over  $37450
  ( $75600, $115225]     $14693.75 + 28%   of the excess over  $75600
  ($115225, $205750]     $25788.75 + 33%   of the excess over $115225
  ($205750, $232425]     $55662    + 35%   of the excess over $205750
  ($232425,      $∞]     $64998.25 + 39.6% of the excess over $232425

I'd like to see "golf the entire functionality of TurboTax"

@qwr I don't think golfing works well with the whole "fix it every year" that tax code has to be

@CAD97 Nonsense, even this problem is year dependent!

Python 3, 427 382 317 309 308 275 bytes
-45 bytes by figuring ternary expression out (wow that's a long line); thanks Maltysen
-65 bytes, now with iteration for DRYer code!
-8 bytes by in-lining tuple variables; thanks Majora
-1 byte by using a dict rather than ternary chain; thanks again Maltysen
-33 bytes by reusing MFS step as half of MFJ/QW and calculating tax an order of magnitude larger; thanks Neil
def f(i,s):
 t=i;k={'MFS':(9225,28225,38150,39625,90525,26675),'S':(9225,28225,53300,98550,222200,1700),'HH':(13150,37050,79400,80250,201650,27500)}
 for x in range(6):
  i-=k[s][x]if s in k else k['MFS'][x]*2
  if i>0:t+=(.5,1,.3,.5,.2,.46)[x]*i
 return'{:.2f}'.format(t*.1)

If I had been thinking I would have made the function signature t(a,x), but I guess I'll stick with function(income, status).
When code is barely undertstood by the writer, is that when you win at golf?

you can save by changing the ifs into a series of ternaries and having only one a,b,c,d,e,f=

@Maltysen And now since I figured out how to iterate to save repetition of taxation, I only have to assign the tuple :)

You can shave off 10 bytes by replacing c and r with the literal tuple, because they are only used once. (tested, working; even works with the long c line)

you can prolly save more with either dicts or indexing and slicing.

@Majora I had to put parenthesis around the in-lined c to make it index properly. Is this a python version issue? (I'm running 3.5.1.)

@Maltysen The problem with a dictionary is that both MJF and QW have to map to the same tuple (here the last else). I will try it, though. I don't really see where indexing and slicing could help any more at this point.

@CAD97 No, that's normal, now that I think about it... Other wise it would be else(18450,56450,76300,79250,181050,53350)[x], which would mean ...[x] if the else clause was reached.

@Maltysen Wow, using a dict is actually shorter by one character. And (slightly) more readable.

@CAD97 You can assign the repeated tuple to a variable and reference it twice from the dict (Not sure how many chars it would save you). If you did this, you could also inline the dict.

@Majora320 +3 bytes from current, if my count is correct.

"When code is barely undertstood by the writer, is that when you win at golf".  Almost.  The next step is to port your code to pyth :)

@DigitalTrauma Or Seriously/Actually. Deer god, that would be terrifying. I might be working on that now.

I think you can save 6 bytes using t=i, (.5,1,.3,.5,.2,.46) and format(t*.1).

Does i-=(k[s][x]if s in k else k['MFS'][x]*2) work?

You can shave off a few bytes by replacing the indentation of 2 spaces with a single tab character on the lines i-=... and if i>0... if you want to swap to Python 2. You can also save a byte (newline) by putting the declaration of k and t on the same line, separated by a ; like so: k={...};t=.1*i

@Neil, yeah, it works. Nicely spotted!

Would it save some bytes to change the second indentation to tab?

@KennyLau It would if I switched to Python 2 but seeing as it's only a trivial 2-byte difference and I don't have the Py2 runtime on my computer I'm not going to bother

JavaScript (ES6), 223 bytes
(i,s)=>(({MFS:a=[x=9225,y=28225,38150,39625,90525,26675],S:[x,y,53300,98550,222200,1700],HH:[13150,37050,79400,80250,201650,27500]}[s]||a.map(b=>b*2)).reduce((t,b,j)=>t+((i-=b)>0&&i*[.5,1,.3,.5,.2,.46][j]),i)*.1).toFixed(2)

Basically a port of CAD97's Python answer, but I saved 4 bytes by multiplying the tax by 10 during the calculation and 11 bytes by reducing the duplication in the tax bands.

@DigitalTrauma Oops I don't develop on the machine on which I have PPCG open so sometimes I typo when copying the code across. (The beauty of Code Golf is that I want to copy as little code as possible!)

Good.  Works for me now in both firefox and chrome.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Linear Independence
Given a set of vectors all of the same positive finite dimension, output a falsey value if they are linearly dependent and a truthy value if they are linearly independent. A set of vectors v1, v2, ... is linearly dependent if for some scalars a1, a2, ... not all equal to 0,  a1v1 + a2v2 + ... = 0. (0 is the zero vector.)
Note: Using an inbuilt function to find the rank of a matrix or test vectors for linear dependence is not allowed.
Note 2: All input will be formed from integers.
Test cases (input -> output):
[[0,1],[2,3]] -> True
[[1,2],[2,4]] -> False
[[2,6,8],[3,9,12]] -> False
[[1,2],[2,3],[3,4]] -> False
[[1,0,0],[0,1,0],[0,0,1]] -> True
[[0]] -> False
[] -> True
[[1,1],[0,1],[1,0]] -> False
[[1,2,3],[1,3,5],[0,0,0]] -> False

Can we take the set of vectors as a rectangular matrix?

Yes, you can take the input as a rectangular matrix.

Can I take the number of rows and columns as additional input?

May we call a determinant built-in?

May we try to invert the matrix with a built-in and see if that succeeds? May we call a built-in to find all the eigenvalues?

@poi830 That seems really ad-hoc. To write a solution that uses linear-algebra functions, it seems like I'd have to guess what you'd allow or not. That strikes me as a mild case of Do X without Y. I understand you don't want cheap solutions with built-ins that just do the problem, but it's a hard line to draw. In particular, many matrix norms and decompositions can indirectly tell you if a set of vectors are independent, even though that's not their purpose.

@xnor You could not have said it better

Edited, determinants and inversions of the matrix are now allowed, but may not be helpful because the matrix is not always square.

Julia, 28 27 bytes
X->X==[]||eigmin(X'X)>eps()

This is an anonymous function that accepts a 2-dimensional array with the vectors as columns and returns a boolean. To call it, assign it to a variable.
For any real, non-singular matrix X, the square matrix XTX is positive definite. Since a matrix is non-singular if and only if all of its column vectors are linearly independent and non-singular implies XTX is positive definite, we can declare the vectors to be linearly independent if the product is positive definite. A matrix is positive definite if and only if all of its eigenvalues are strictly positive, or equivalently when its smallest eigenvalue is strictly positive.
So for an input matrix X, we construct XTX and get the minimum eigenvalue using eigmin(X'X). To account for floating point error, we check this against the machine precision, eps, rather than 0, to declare positivity. Since we also want empty input to return true, we can simply add the condition X==[].
Saved 1 byte thanks to Dennis!

Matlab - 19 16 bytes
@(A)det(A*A')>.5

If the product of the matrix and its transpose is singular, then the rows of the matrix are linearly dependent. The determinant is non-negative, and since the entries are integral (thank you Alex A.), the determinant is integral and can be compared to .5.
It would have been nice to just do @(A)~det(A*A'), but unfortunately det can give almost-zero for singular matrices.
Try it on ideone

I didn't want to do arbitrary thresholding Using eps is actually arbitrary too :-) Maybe you want to use Ideone to provide an online demostration of your code for the test cases in the challenge (see for example my Octave answer). And welcome to PPCG!

@LuisMendo I meant the difference was in det vs rcond. rcond gives very small values for singular matrices compared to det. Will try to add ideone!

My point is: how can you be sure that you need to compare with eps and not with 10*eps for example? Anyway, that probably happens to other answers too

@LuisMendo Of course you're right, with this kind of solution it's always possible to produce a large matrix that will break it. I have an exact solution also, do you think I should post it as another answer? By the way ideone doesn't seem to support Matlab

Posting several answers is welcome, as long as they are really different (different language, or different approach). In Ideone you can use Octave, which is almost the same as Matlab. See this for example

@AlexA. The claim is true. The rows of M being dependent with coefficients given by vector v means there that v*M=0. This implies that v*M*(M^T)=0, so M*M^T is singular, since it maps some nonzero vector to zero. Conversely, if M*(M^T) is singular, then there exists a vector v so that v*M*(M^T)=0, in which case (v*M)*(v*M)^T=0. But, only the zero vector has norm zero, so v*M=0, which means the rows of M have a linear dependence.

@xnor Very clear explanation!

@xnor That's great, thanks for the explanation!

Since the input matrix is guaranteed to only contain integers, a nonzero determinant will be at least 1, so you can do @(A)det(A*A')>.5 or similar.

@AlexA. Does Matlab have 0 Falsey and the rest Truthy? If so, you don't even need the >.5.

@xnor For instance one of the text cases gives  det(A*A')=1.7764e-15, which is truthy but should return false, that's why >.5 is needed

@AlexA.Great point, thank you!

Julia, 14 bytes
M->det(M'M)>.5

Based on @Anna's MATLAB answer and @AlexA.'s Julia answer. Expects a matrix whose columns are the input vectors and returns a Boolean.
det returns a float, so we cannot compare the result directly with 0. However, since the entries of M are integers, the lowest possible positive determinant is 1.
Verification
julia> f = M->det(M'M)>.5
(anonymous function)

julia> [f(M) for M in(
         [0 2;1 3],
         [1 2;2 4],
         [2 3;6 9;8 12],
         [1 2 3;2 3 4],
         [1 0 0;0 1 0;0 0 1],
         zeros((1,1)),
         zeros((0,0)),
         [1 0 1;1 1 0],
         [1 1 0;2 3 0;3 5 0]
       )]
9-element Array{Any,1}:
  true
 false
 false
 false
  true
 false
  true
 false
 false

NARS2000 APL, 12 bytes
(≡≤-.×)⊢+.×⍉

How it works
(≡≤-.×)⊢+.×⍉  Monadic function. Right argument: M

           ⍉  Transpose M.
       ⊢      Yield M.
        +.×   Perform matrix multiplication.
              For empty M, this yields a zero vector (for some reason).
(     )       Apply this matrix to the matrix product:
   -.×          Compute the determinant.
                This (mistakenly) yields 0 if M is empty.
 ≡              Yield the depth of M (1 is non-empty, 0 if empty).
  ≤             Compare.
                Since 0≤0, this corrects the error.

R, 72 60 bytes
function(x,m,n)!is.null(x)&&all(pracma::rref(x)==diag(,m,n))

This is a function that accepts the vectors as columns in a matrix as well as the dimensions of the matrix and returns a logical. To call it, assign it to a variable. It requires the pracma package to be installed but it doesn't have to be imported.
The actual checking for linear independence is done by row reducing the matrix to echelon form and checking whether that's equal to an identity matrix of matching dimension. We just need a special case for when the input is empty.
Saved 12 bytes with help from Luis Mendo!

Mathematica - 29 bytes
#=={}||Det[#.Transpose@#]!=0&

Uses the property that the product of the eigenvalues of matrix A is equal to the determinant of A.
Sample
#=={}||Det[#.Transpose@#]!=0&@{{1,2,3},{1,3,5},{0,0,0}}
>>  False

MATL, 13 11 bytes
t!Y*2$0ZnYo

Thanks to Luis for golfing off two bytes.
Based on Anna's MATLAB answer.
Explanation
t!Y*2$0ZnYo
t              duplicate input
 !             transpose
  Y*           matrix product, yields X^T * X
    2$0Zn      determinant
         Yo    round

Octave, 32 27 bytes
Thanks to @Suever for removing 5 bytes!
@(x)~numel(x)|any(rref(x)')

The code defines an anonymous function. To call it assign it to a variable or use ans. The result is a non-empty array, which in Octave is truthy if all its entries are nonzero.
Try all test cases online.
This is based on the reduced row echelon form of a matrix. A non-empty matrix is full-rank iff each row of its reduced row echelon form contains at least one non-zero entry. This is checked by condition any(rref(x)', where ' can be used to transpose instead of .' because the entries are not complex. The empty matrix is dealt with separately by the condition ~numel(x) (which is the same as isempty(x) but shorter).

Couldn't you remove the all based on this definition of truthy and falsey? http://ideone.com/Zd5gQa

@Suever Yes! Thank you!

JavaScript (ES6), 162
M=>M.sort((a,b)=>P(a)-P(b),P=r=>r.findIndex(v=>v)).map(_=>M=M.map((r,i)=>(p=P(r))>q?(k=M[i],q=p,r):r.map((v,j)=>v*k[q]-k[j]*r[p]),q=-1))&&M.every(r=>r.some(v=>v))

Reduce the matrix and check if every row has at least 1 non zero element.
Less golfed
M=>(
  P=r=> P=r=>r.findIndex(v=>v)), // First nonzero element position or -1
  // sort to have P in ascending order, but rows all 0 are at top
  M.sort((a,b)=>P(a)-P(b)),
  M.map(_=> // repeat transformation for the number of rows
    M=M.map((r,i)=>(
      p = P(r),
      p > q
       ? (k=M[i], q=p, r)
         // row transform
         // note: a 0s row generate a NaN row as p is -1
       : r.map((v,j) => v*k[q] - k[j]*r[p])
     )
     ,q=-1
    )
  ),
  // return false if there are rows all 0 or all NaN
  M.every(r=>r.some(v=>v))
)

Test

F=M=>M.sort((a,b)=>P(a)-P(b),P=r=>r.findIndex(v=>v))
.map(_=>M=M.map((r,i)=>
(p=P(r))>q?(k=M[i],q=p,r):r.map((v,j)=>v*k[q]-k[j]*r[p])
,q=-1))&&M.every(r=>r.some(v=>v))

console.log=(...x)=>O.textContent += x +'\n'

;[[[0,1],[2,3]] // True
,[[1,2],[2,4]] // False
,[[2,6,8],[3,9,12]] // False
,[[1,2],[2,3],[3,4]] // False
,[[1,0,0],[0,1,0],[0,0,1]] // True
,[[0]] // False
,[[0,0],[1,1]] // False
,[] // True
,[[1,1],[0,1],[1,0]] // False
,[[1,2,3],[1,3,5],[0,0,0]] // False
,[[1,2,3],[4,5,6]] // True
].forEach(m=>console.log(m,F(m)))

MATL, 33 bytes
|ssQt_w2$:GZy1)Z^!2$1!G*Xs!Xa~s3<

This uses current release (16.1.0) of the language, which predates the challenge.
Input format is
[0 1; 2 3]

or
[[0 1];[2 3]]

Try it online!
Explanation
This uses only integer opeations, so it is not subject to rounding errors (as long as the involved integers don't exceed 2^52).
It works by applying the definition. It suffices to test for integer scalars a1, a2, ... between −S−1 and S+1, where S is the sum of absolute values of all numbers in the input 2D array. In fact much lower values of S could be used, but this one requires few bytes to compute.
All "combinations" (Cartesian product) of values a1, a2, ...  between −S−1 and S+1 are tested. The input vectors v1, v2, ... are independent iff only one of the linear combinations a1v1+a2v2+... gives a 0 result (namely that for coefficients a1, a2, ... = 0).
|ssQ    % sum of absolute values of input plus 1
t_w     % duplicate, negate, swap
2$:     % binary range: [-S-1 -S ... S+1]
GZy1)   % push input. Number of rows (i.e. number of vectors), N
Z^      % Cartesian power. Gives (2S+3)×N-column array
!2$1!   % Permute dimensions to get N×1×(2S+3) array
G       % Push input: N×M array
*       % Product, element-wise with broadcast: N×M×(2S+3) array
Xs      % sum along first dimension (compute each linear combination): 1×M×(2S+3)
!       % Transpose: M×1×(2S+3)
Xa~     % Any along first dimension, negate: 1×1×(2S+3). True for 0-vector results
s       % Sum (number of 0-vector results)
2<      % True if less than 2

J, 18 bytes
1<:[:-/ .*|:+/ .*]

This is a tacit verb that accepts a matrix with the vectors as columns and returns 0 or 1 depending on whether the vectors are linearly dependent or independent, respectively.
The approach is based on Anna's Matlab answer and Dennis' Julia answer. For a matrix X, the square matrix XTX is singular (i.e. has zero determinant) if the columns of X are linearly independent. Since all elements of X are guaranteed to be integers, the smallest possible nonzero determinant is 1. Thus we compare 1 ≤ det|XTX| to get the result.
Examples (note that |: > is just for shaping the input):
  f =: 1<:[:-/ .*|:+/ .*]
  f |: > 0 1; 2 3
1
  f |: > 1 2; 2 4
0
  f |: > 2 6 8; 3 9 12
0
  f |: > 1 2; 2 3; 3 4
0
  f |: > 1 0 0; 0 1 0; 0 0 1
1
  f 0
0
  f (0 0 $ 0)
1
  f |: > 1 1; 0 1; 1 0
0
  f |: > 1 2 3; 1 3 5; 0 0 0
0

Made possible with help from Dennis!

I wonder if finding the inverse of the matrix is allowed. If it is, 1:@%. ::0: for 10 bytes could be used. I think it isn't.

Python 2 with NumPy - 85 112 103 102 bytes
import numpy
x=input(i)
try:print reduce(lambda a,b:a*b,numpy.linalg.eigvals(x))
except:print(x==[])|0

Hopefully can get a few off, FGITW.

What is the significance of the |0 in the final line?

Jelly, 5 2 bytes
ÆḊ

Try it online!

You don't need the æ×Z part. ÆḊ is implemented as sqrt(det(A × A')) for non-square matrices. I'm not sure if that would count as a LI built-in though...

Determinant is allowed.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Autocomplete the input
Pre-Note
Because of popular demand, and to avoid disqualifying certain languages, the dictionary can now be provided as input parameter.
Intro
Given a dictionary of words, you should write an autocomplete program or function.
Autocompletion
"Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing." (Wikipedia)
Autocompletion is oftenly used to reduce the time needed for typing sentences. After typing a single character, the program will start guessing what the user is trying to say. In this challenge we will simulate the behaviour of autocompleting words.
If the program encounters a word it doesn't know, and no matching autocompletion words can be found, it will assume that the user is trying to type a word the program doesn't know. Good autocompletion software will own and edit a custom dictionary of words, but for the sakes of complexity that's not part of this challenge.
Input
Your program/function will take at least a single parameter of input. This parameter can either be a string or an array of characters, and will consist of lowercase characters [a-z].
Optionally, your program/function will take a second parameter containing a dictionary of words. More info on this in the paragraph Dictionary.
Output
You should print or return an array of autocompleted words. For each character in the input, an autocompletion should be added to the output array.
The autocompletions will be taken from the provided dictionary. If a word doesn't exist in the dictionary, it will alphabetically search for the next word matching your characters. If no matching word is found, the input will be returned (see test cases)
Dictionary
If you choose to read the dictionary from a file, the file structure should be your list of words, seperated by newlines.
If you choose to submit the dictionary of words as a parameter of a function call, it should be structured as an ordered list of strings; ['cat', 'cake', ...].
The input is always fully lowercase and sorted alphabetically.
Test case
a.txt content:
alpha
calf
cave
coax
code
codegimmick
codegolf
cool
gamma

Test cases:
"codegolf"                  // ["calf", "coax", "code", "code", "codegimmick", "codegolf", "codegolf", "codegolf"]
"alpaca"                    // ["alpha", "alpha", "alpha", "alpa", "alpac", "alpaca"]
["t", "h", "i", "s"]        // ["t", "th", "thi", "this"]
("catses", ["cake","cats"]) // ["cake", "cake", "cats", "cats", "catse", "catses"]

This is code-golf, shortest code in bytes wins

Why does e.g. alpaca give ["alpha", "alpha", "alpha", "alpa", "alpac", "alpaca"]?

@PeterTaylor It's [ac("a"), ac("al"), ac("alp"), ..., ac("alpaca")].

@LegionMammal978 But alpa isn't a word, is it? Shouldn't alpa autocomplete to alpaca or something?

@mbomb007 "Alpaca" isn't a word according to the given dictionary. "Alpa" is left as it is because it cannot autocomplete to anything in the dictionary.

Can the dictionary be taken as the first parameter instead?

@KennyLau Of course

JavaScript (ES6), 56
Input: array of characters, array of words
Output: array
(s,d,w='')=>s.map(c=>d.find(e=>e.startsWith(w),w+=c)||w)

Test

f=(s,d,w='')=>s.map(c=>d.find(e=>e.startsWith(w),w+=c)||w)

dict=['alpha','calf','cave','coax','code','codegimmick','codegolf','cool','gamma']

console.log=x=>O.textContent+=x+'\n'

;[['c','o','d','e','g','o','l','f'],['a','l','p','a','c','a'],['t','h','i','s']]
.forEach(t=>console.log(t+' -> '+f(t,dict)))

Pyth, 22 13 bytes
mhf!xTd+Qd._z

m         _z  map over prefixes of second input...
 hf    +Qd    find the first element in (dictionary+word) which...
   !xTd       ... starts with k

Sample run:
llama@llama:~$ pyth -c 'mhf!xTd+Qd._z'
['alpha', 'calf', 'cave', 'coax', 'code', 'codegimmick', 'codegolf', 'cool', 'gamma']
codegolf
['calf', 'coax', 'code', 'code', 'codegimmick', 'codegolf', 'codegolf', 'codegolf']

Thanks to @FryAmTheEggman for 4 bytes!

I was about to post... Anyway your version is shorter.

@Doorknob I updated the challenge to allow a dictionary to also be given as input parameter. Feel free to update your answer if this will improve the byte count

Javascript ES6, 80 77 chars
(w,d)=>[...w].map((x,i)=>RegExp(`\\b${x=w.slice(0,i+1)}\\w*`).exec([d,x])[0])

Test:
d="alpha,calf,cave,coax,code,codegimmick,codegolf,cool,gamma".split`,`;
f=(w,d)=>[...w].map((x,i)=>RegExp(`\\b${x=w.slice(0,i+1)}\\w*`).exec([d,x])[0])
;[
f("cat", ["cat"])[0] === "cat",
f("codegolf", d) == '' + ["calf", "coax", "code", "code", "codegimmick", "codegolf", "codegolf", "codegolf"],
f("alpaca", d) == '' + ["alpha", "alpha", "alpha", "alpa", "alpac", "alpaca"],
f("this", d) == '' + ["t", "th", "thi", "this"],
f("catses", ["cake","cats"]) == '' + ["cake", "cake", "cats", "cats", "catse", "catses"]
]

Can reduce 4 chars (73 in total) if return array of single-element arrays:
(w,d)=>[...w].map((x,i)=>RegExp(`\\b${x=w.slice(0,i+1)}\\w*`).exec(d)||x)

Test:
d="alpha,calf,cave,coax,code,codegimmick,codegolf,cool,gamma".split`,`;
f=(w,d)=>[...w].map((x,i)=>RegExp(`\\b${x=w.slice(0,i+1)}\\w*`).exec(d)||x)
;[
// f("cat", ["cat"])[0] === "cat", // will be failed
f("cat", ["cat"])[0][0] === "cat", // ok
f("codegolf", d) == '' + ["calf", "coax", "code", "code", "codegimmick", "codegolf", "codegolf", "codegolf"],
f("alpaca", d) == '' + ["alpha", "alpha", "alpha", "alpa", "alpac", "alpaca"],
f("this", d) == '' + ["t", "th", "thi", "this"],
f("catses", ["cake","cats"]) == '' + ["cake", "cake", "cats", "cats", "catse", "catses"]
]
[false, true, true, true, true]

Mathematica, 108 89 bytes
Select[Append[#2,c=b~StringTake~a],StringStartsQ@c][[1]]~Table~{a,StringLength[b=""<>#]}&

No, it isn't very pretty.

I updated the challenge to allow a dictionary to also be given as input parameter. Feel free to update your answer if this will improve the byte count

JavaScript (ES6 / Node.js), 94 bytes
s=>s.map(c=>(d.match(`\\b${p+=c}.*`)||p)+"",p="",d=require("fs").readFileSync("a.txt","utf8"))

Anonymous function that takes an array of characters.
Or 52 bytes in JavaScript (ES6) with passing the dictionary as a string:
d=>s=>s.map(c=>(d.match(`\\b${p+=c}.*`)||p)+"",p="")

I updated the challenge to allow a dictionary to also be given as input parameter. Feel free to update your answer if this will improve the byte count

Python 3, 94 bytes
s=""
for c in input():s+=c;print(next((o for o in open("a.txt")if o.startswith(s)),s).strip())

I updated the challenge to allow a dictionary to also be given as input parameter. Feel free to update your answer if this will improve the byte count


text:
Make a better score than my students!
For the last day of the semester, I decided to have some fun with my students and I showed them Code Golf... poor guys, they're addicted now.
The goal was to compete against the other students to solve those problems with what would be very usual rules for you. They had to use C# (because it's the language they are learning right now) so please do the same.
The length of each method must be the shortest including the method signature!
Tasks
Write functions that do the following:

Input: string, int.
Output: string.
Description: the output string repeats the input string as many times as the input int.
Example: a("Hi", 5) returns "HiHiHiHiHi".
Input: int.
Output: int.
Description: the output is the quantity of prime numbers lower or equal to the input.
Example: b(10) returns 4. b(100) returns 25.
Input: object[].
Output: object[].
Description: returns the input without the null values.
Example: c(new object[] { "Hello", 42, null, new Program(), null, null, false }) returns an array containing [Hello, 42, Program instance, false].
Input: int.
Output: int.
Description: the output is the sum of all the integers from 1 to int input.
Example: d(4) returns 10 (because 1 + 2 + 3 + 4 = 10).
Input: char.
Output: char.
Description: the output is the input char with the other case. non-letters don't need to be checked.
Example: e('a') returns 'A'. e('A') returns 'a'. e('-') may have unexpected results.
Input: string, int.
Output: bool.
Description: true if and only if the length of the input string is a multiple of the input int.
Example: f("Programmer", 5) returns true. f("Programming", 5) returns false.
Input: string.
Output: boolean.
Description: true if and only if the input string is a palindrome.
Example: g("level") returns true. g('label') returns false.

Their solutions
I took the best of each task that they presented to me.

64
135
105
30
71
45
83

Total: 533
(I will write their complete answers when the challenge is over).
Your rules

Use C# to be evaluated equally to my students.
Write each task on a separate line with the method signature (string a(string s,int i)), it is part of the answer.
Write your best score for each task so we know what score matches what task.
Write the sum of all task scores in the title of your answer.
The shortest overall score wins, but honorary mention may be awarded to the lowest score of a given task.

Note: It is not impossible that many of you have the same answer, my students did without cheating. Please consider that someont who has the same answer as you may simply have taken the same path and did not steal your idea.

FAQ:

Why should people here use C#? It's not the best language for code golfing !
I know, but I would like to have some examples from pros like you to show them what a real golfer would do in their shoes.

I think assigning your students golfing tasks is a nice idea but restricting this to C# may garner you some disapproval here :/ Perhaps encourage C# but don't require it? Just a heads up.

Thanks for the advice. I'm still considering, because someone will probably find a Pyth code that does all the 7 tasks in 5 characters total ;-). I'll add a comment in the question.

Challenges with multiple unrelated parts are deemed off-topic. Please consider posting them as separate challenges. You can use the leaderboard from this challenge to automatically compute scores over all parts. But note that some of your individual parts are likely duplicates (which is exactly why multi-part challenges are disallowed).

I'm voting to close this question as off-topic because this challenge consists of multiple unrelated subtasks.

Just an idea, if you choose to pursue this question, I think posting each of your students' best answers individually as a [tag:tips] question would probably be the best way to go about what you want. That's just my opinion though, if you want to ask you could try meta or chat.

Got 294 Yeee - Oh, post closed...

Got even better - 238 it is

Score: 387

string a(string s,int n){return string.Join(s,new string[n+1]);} (64)
int b(int n){bool p=true;for(int i=2;i<n;i++)if(n%i<1)p=false;return n<2?0:b(n-1)+(p?1:0);} (91)
object[]c(object[]l){return l.Where(x=>x!=null).ToArray();} (59)
int d(int n){return(n+1)*n/2;} (30)
char e(char c){return(char)(c<97?c+32:c-32);} (45)
bool f(string s,int n){return s.Length%n<1;} (44)
bool g(string s){return s.SequenceEqual(s.Reverse());} (54)

Total: 387

!0 is shorter than true. same for !1 shorter than false

Not with C#, thanks anyway.

@Oltarus 1>0 and 0>1  though...

For part 5, c^32 should do.


text:
Winnable Solitaire Mancala Boards
Mancala is the name of a family of board games that usually involve a series of cups filled with beads that the players manipulate. This challenge will use a specific rule set for a solitaire variant of the game.
The board consists of a "basket" at one end, followed by an infinite number of cups, numbered starting from 1. Some of the cups will have some number of beads in them. If the nth cup has exactly n beads in it, you may "sow" the beads from it. Sowing means to take all n beads out of the cup, then deposit them one at a time in each cup towards the basket. The last bead will go into the basket. The player wins when all of the beads on the board are in the basket.
Clearly, there are many boards which are not winnable, such as if there is exactly one bead in the second cup. There are no legal plays because all the cups with 0 beads cannot be sown, and the second cup does not have enough beads to be sown. This is obviously no fun, so your task will be to create winnable boards.
Task
Given a positive integer representing a number of beads output a list of non-negative integers representing the number of beads that should be put in each cup to make a winnable board as described above. This list should not contain any trailing zeroes.
For any given number of beads, there is always exactly one winnable board configuration.
Demonstration
This is a demonstration of how to play the winnable board for and input of 4. The winnable board is [0, 1, 3]. We start with the only available move, sowing the beads from the third cup to get [1, 2, 0]. Now we actually have a choice, but the only correct one is sowing the first cup, getting: [0, 2, 0]. Then we sow the second cup yielding [1, 0, 0] and finally we sow the first cup again to get all empty cups.
Test cases:
1 => [1]
2 => [0, 2]
3 => [1, 2]
4 => [0, 1, 3]
5 => [1, 1, 3]
6 => [0, 0, 2, 4]
7 => [1, 0, 2, 4]
8 => [0, 2, 2, 4]
9 => [1, 2, 2, 4]
10 => [0, 1, 1, 3, 5]
11 => [1, 1, 1, 3, 5]
12 => [0, 0, 0, 2, 4, 6]
13 => [1, 0, 0, 2, 4, 6]
14 => [0, 2, 0, 2, 4, 6]
15 => [1, 2, 0, 2, 4, 6]
16 => [0, 1, 3, 2, 4, 6]
17 => [1, 1, 3, 2, 4, 6]
18 => [0, 0, 2, 1, 3, 5, 7]
19 => [1, 0, 2, 1, 3, 5, 7]
20 => [0, 2, 2, 1, 3, 5, 7]

Big thanks to PeterTaylor for coming up with a program to generate test cases!

Proof of uniqueness with formula.

CJam (21 bytes)
M{_0+0#_Wa*\)+.+}ri*`

Online demo
Explanation
I independently derived the "unplaying" technique mentioned in this paper. We prove by induction that there is exactly one winning board for a given number of beads.
Base case: with 0 beads, the only winning board is the empty one.
Inductive step: if we sow from cup k then at the next move cup k will be empty and every cup nearer the basket will contain at least one bead. Therefore we can find the unique winning board with n beads from the winning board with n-1 beads by looking for the lowest numbered empty cup, taking one bead from the basket and one from each cup below that empty cup, and placing them all in the empty cup.
Dissection
M           e# Start with an empty board
{           e# Loop
  _0+0#     e#   Find position of first 0 (appending to ensure that there is one)
  _Wa*      e#   Make array of that many [-1]s
  \)+       e#   Append the index plus 1 (since board is 1-indexed)
  .+        e#   Pointwise addition
}
ri*         e# Read integer from stdin and execute loop that many times
`           e# Format for display

Python, 42 41 bytes
m=lambda n,i=2:n*[1]and[n%i]+m(n-n%i,i+1)

JavaScript (ES6), 63 37 bytes
f=(n,d=2)=>n?[n%d,...f(n-n%d,d+1)]:[]

Port of @orlp's Python answer. Explanation: Consider the total number of beads in the ith and higher cups. Each play from one of these cups will remove i beads from that total. (For instance, if i is 3, and you play from the fifth cup, you reduce the number of beads in that cup by five, but you also add one to both the fourth and the third cups.) The total must therefore be a multiple of i. Now the i-1th cup cannot contain i or more beads, so in order for it to leave a multiple of i it must contain the remainder of the beads modulo i.
Previous explanation (from @xnor's link): The naive approach is the "reverse playing" technique. This uses the observation that making a play empties a cup, so reverse playing collects a bead from each cup and puts them in the first empty cup, like so (63 bytes):
f=n=>n?[...a=f(n-1),0].some((m,i)=>(m?a[i]--:a[i]=i+1)>m)&&a:[]

Now, just consider the first i cups. In the case that one of them is empty, reverse playing will add 1 to the total number of beads in those cups, while in the case that none of them is empty, reverse playing will subtract i from the total, however this is equivalent to adding 1 modulo i+1. After n reverse plays the sum of the beads in the first i cups will therefore be equivalent to n modulo i+1, or put it another way, the number of beads in the ith cup will be equivalent to n minus the sum of the beads in the preceding cups, modulo i+1. Now for the ith cup to be playable the number of beads cannot exceed i, so in fact it will equal the number of remaining beads modulo i+1. (Note that I use d=i+1 as it uses fewer bytes.)

You forgot to assign the function in the version using @orlp's solution, preventing the recursion from working. Also regarding that solution, is array concatenation with + not a thing in ES6?

@KevinLau Oops, and that after going to the trouble of including it in the byte count too! But no, + is string concatenation, unless both parameters are numbers or booleans, in which case it is addition. Fortunately array comprehensions make arbitrary concatenation easier.

Ruby, 36 bytes
A port of @orlp's answer because it's far too genius for me to think of anything better.
m=->n,i=2{n>0?[n%i]+m[n-n%i,i+1]:[]}


text:
Sum the odd square numbers less than N
Write a program or function to output the sum of the odd square numbers (OEIS #A016754) less than an input n.
The first 44 numbers in the sequence are:
1, 9, 25, 49, 81, 121, 169, 225, 289, 361, 441, 529, 625, 729, 841, 961, 1089,
1225, 1369, 1521, 1681, 1849, 2025, 2209, 2401, 2601, 2809, 3025, 3249, 3481,
3721, 3969, 4225, 4489, 4761, 5041, 5329, 5625, 5929, 6241, 6561, 6889, 7225, 7569

The formula for the sequence is a(n) = ( 2n + 1 ) ^ 2.
Notes

Your program's behaviour may be undefined for n < 1 (that is, all valid inputs are >= 1.)

Test cases
1 => 0
2 => 1
9 => 1
10 => 10
9801 => 156849
9802 => 166650
10000 => 166650

Neither of the close reasons on this are valid reasons to close a challenge...

Jelly, 6 bytes
½Ċ|1c3

Try it online! or verify all test cases.
Background
For all positive integers k, we have 1² + 3² + ⋯ + (2k - 1)² = k(2k - 1)(2k +1) ÷ 3.
Since there are m C r = m! ÷ ((m-r)!r!) r-combinations of a set of m elements, the above can be calculated as (2k + 1) C 3 = (2k + 1)2k(2k - 1) ÷ 6 = k(2k - 1)(2k + 1) ÷ 3.
To apply the formula, we must find the highest 2k + 1 such that (2k - 1)² < n. Ignoring the parity for a moment, we can compute the highest m such that (m - 1)² < n as m = ceil(srqt(n)). To conditionally increment m if it is even, simply compute m | 1 (bitwise OR with 1).
How it works
½Ċ|1c3  Main link. Argument: n

½       Compute the square root of n.
 Ċ      Round it up to the nearest integer.
  |1    Bitwise OR with 1 to get an odd number.
    c3  Compute (2k + 1) C 3 (combinations).

JavaScript (ES6), 30 bytes
f=(n,i=1)=>n>i*i&&i*i+f(n,i+2)

31 bytes if f(1) needs to return zero instead of false:
f=(n,i=1)=>n>i*i?i*i+f(n,i+2):0

Haskell, 30 bytes
f n=sum[x^2|x<-[1,3..n],x^2<n]

Surprisingly normal-looking.

05AB1E, 10 8 bytes
Code:
<tLDÉÏnO

Explanation:
<         # Decrease by 1, giving a non-inclusive range.
 t        # Take the square root of the implicit input.
  L       # Generate a list from [1 ... sqrt(input - 1)].
   DÉÏ    # Keep the uneven integers of the list.
      n   # Square them all.
       O  # Take the sum of the list and print implicitly.

Might come in handy: t;L·<nO.
Uses CP-1252 encoding. Try it online!.

C#, 126 131 bytes
Edited version to conform with the new question:
class P{static void Main(){int x,s=0,n=int.Parse(System.Console.ReadLine());for(x=1;x*x<n;x+=2)s+=x*x;System.Console.Write(s);}}

Using hardcoded limit:
using System;namespace F{class P{static void Main(){int x,s=0;for(x=1;x<100;x+=2)s+=x*x;Console.Write(s);Console.Read();}}}

Welcome to Programming Puzzles and Code Golf! The agreed-upon format for answer headers here is # Language name, number bytes for consistency.

Why do you Console.Read at the end?

namespaces aren't required for single files.

You also should be able to save a few bytes by doing System.Console.Write(s); if it works, and if you don't need theConsole.Read.

I added the Console.Read so the user can actually see the result when the console window appears - I guess using other IDEs this isn't necessary (I'm using Visual Studio). Also, thanks to @somebody for letting me know that namespace isn't required for single files- you learn something new everyday!

@Thomas You can run your program with Ctrl+F5 in VS in which case the window will remain open after the program terminates.

@Thomas You could include your current solution to check validity, and use class P{static void Main(){int x,s=0;for(x=1;x<100;x+=2)s+=x*x;System.Console.Write(s);}} as your actual answer

You can put int.Parse(System.Console.ReadLine()) directly at the n in the check of the loop to safe some bytes. So it becomes class P{static void Main(){int x,s=0;for(x=1;x*x<int.Parse(System.Console.ReadLine());x+=2)s+=x*x;System.Console.Write(s);}}

@KevinCruijssen then its evaluated each time and you have to keep typing in n

Can save two bytes with using static System.Console;class P{static void Main(){int s=0,i,n=int.Parse(ReadLine());for(i=1;i*i<n;i+=2)s+=i*i;Write(s);}}

Jelly, 7
’½R²m2S

Try it online or try a modified version for multiple values
Shh... Dennis is sleeping...
Thanks to Sp3000 in chat for their help!
Explanation:
’½R²m2S
’           ##  Decrement to prevent off-by-one errors
 ½R²        ##  Square root, then floor and make a 1-indexed range, then square each value
    m2      ##  Take every other value, starting with the first
      S     ##  sum the result

Dennis is actually awake.

@Dennis Ahh! And alert too, apparently...

One does not simply out-golf Dennis. :P

R, 38 36 bytes
function(n,x=(2*0:n+1)^2)sum(x[x<n])

@Giuseppe saved two bytes by moving x into the arguments list to save the curly braces. Cool idea!
Ungolfed
function(n, x = (2*(0:n) + 1)^2)  # enough odd squares (actually too many)
  sum(x[x < n])                   # subset on those small enough
}

Try it online!

Welcome to PPCG!

This site is awesome, thanks!

You should be able to save two bytes by moving x into a default function argument and then you can remove the braces.

CJam, 15 Bytes
qi(mq,2%:)2f#1b

Try it online!
Hardcoded 10000 solutions:
Martin's 12 byte solution:
99,2%:)2f#1b

My original 13 byte solution:
50,{2*)2#}%:+

Try it online!

Your code is 14 bytes (you had a trailing linefeed in the link), but I think it's not correct for input 9801, since the challenge asks for the squares smaller than the input.

@MartinButtner Yes, you're right. I'll see if I can find an elegant fix

Octave, 23 bytes
@(x)(x=1:2:(x-1)^.5)*x'

Testing:
[f(1); f(2); f(3); f(10); f(9801); f(9802); f(10000)]
ans =
        0
        1
        1
       10
   156849
   166650
   166650

C, 51, 50 48 bytes
f(n,s,i)int*s;{for(*s=0,i=1;i*i<n;i+=2)*s+=i*i;}

Because why not golf in one of the most verbose languages? (Hey, at least it's not Java!)
Try it online!
Full ungolfed program, with test I/O:
int main()
{
    int s;
    f(10, &s);
    printf("%d\n", s);
    char *foobar[1];
    gets(foobar);
}

f(n,s,i)int*s;{for(*s=0,i=1;i*i<n;i+=2)*s+=i*i;}

most verbose languages More golfy than Python, C#, LISP, Forth, etc, C is actually pretty good for golf

@cat I don't think it's more golfy than python. It's definitely better than java, rust and C#, but every python answer on this challenge is < 50 bytes. Also, there's a relevant meta post here.

Actually, 7 bytes
√K1|3@█

Try it online!
Also for 7 bytes:
3,√K1|█

Try it online!
This uses the same formula as in Dennis's Jelly answer.
Explanation:
√K1|3@█
√K       push ceil(sqrt(n))
  1|     bitwise-OR with 1
    3@█  x C 3

Will the next one be called Literally?

MATL, 10 bytes
qX^:9L)2^s

EDIT (July 30, 2016): the linked code replaces 9L by 1L to adapt to recent changes in the language.
Try it online!
q    % Implicit input. Subtract 1
X^   % Square root
:    % Inclusive range from 1 to that
9L)  % Keep odd-indexed values only
2^   % Square
s    % Sum of array

Pyth, 10 bytes
s<#Qm^hyd2

Test suite
Explanation:
s<#Qm^hyd2
    m          Map over the range of input (0 ... input - 1)
       yd      Double the number
      h        Add 1
     ^   2     Square it
 <#            Filter the resulting list on being less than
   Q           The input
s              Add up what's left

Alternative (10 byte): s<#Q%2t^R2

Mathcad, 31 "bytes"

Note that Mathcad uses keyboard shortcuts to enter several operators, including the definition and all programming operators.  For example, ctl-] enters a while loop - it cannot be typed and can only be entered using the keyboard shortcut or from the Programming toolbar.   "Bytes" are taken to be the number of keyboard operations needed to enter a Mathcad item (eg, variable name or operator).
As I have no chance of winning this competition, I thought I'd add a bit of variety with a direct formula version.

How is MathCAD scored? Where can I get it?

The explanation of scoring you give is kinda... flimsy, IMO

You need to make a meta question for the scoring of this language.

Meta question sounds good. Trying to give a non-flimsy explantion for the scoring would rapidly turn into War and Peace.

Racket, 57 bytes
(λ(n)(for/sum([m(map sqr(range 1 n 2))]#:when(< m n))m))

Japt -hx, 6 4 bytes
¬o²ó

Try it
¬o²ó     :Implicit input of integer
¬        :Square root
 o       :Range [0,ceil(¬))
  ²      :Square each
   ó     :Uninterleave
         :Implicit output of sum of last element

Java 8, 128 119 117 111 49 bytes
n->{int s=0,i=1;for(;i*i<n;i+=2)s+=i*i;return s;}

Based on @Thomas' C# solution.
Explanation:
Try it online.
n->{           // Method with integer as both parameter and return-type
  int s=0,     //  Sum, starting at 0
      i=1;     //  Index-integer, starting at 1
  for(;i*i<n;  //  Loop as long as the square of `i` is smaller than the input
      i+=2)    //    After every iteration, increase `i` by 2
    s+=i*i;    //   Increase the sum by the square of `i`
  return s;}   //  Return the result-sum

Haskell, 32 31 bytes
 n#x=sum[x^2+n#(x+2)|x^2<n]
 (#1)

Usage example: (#1) 9802 -> 166650.
Edit: @xnor saved a byte, with a clever list comprehension. Thanks!

It's a byte shorter to cheat away the guard: n#x=sum[x^2+n#(x+2)|x^2<n]

Reng v.3.3, 36 bytes
0#ci#m1ø>$a+¡n~
:m%:1,eq^c2*1+²c1+#c

Try it here!
Explanation
1: initialization
 0#ci#m1ø

Sets c to 0 (the counter) and the input I to the max. 1ø goes to the next line.
2: loop
:m%:1,eq^c2*1+²c1+#c

: duplicates the current value (the squared odd number) and [I m puts max down. I used the less-than trick in another answer, which I use here. %:1,e checks if the STOS < TOS. If it is, q^ goes up and breaks out of the loop. Otherwise:
         c2*1+²c1+#c

c puts the counter down, 2* doubles it, 1+ adds one, and ² squares it. c1+#C increments c, and the loop goes again.
3: final
        >$a+¡n~

$ drops the last value (greater than desired), a+¡ adds until the stack's length is 1, n~ outputs and terminates.

Python, 39 bytes
f=lambda n,i=1:+(i*i<n)and i*i+f(n,i+2)

If, for n=1, it's valid to output False rather than 0, then we can avoid the base case conversion to get 37 bytes
f=lambda n,i=1:i*i<n and i*i+f(n,i+2)

It's strange that I haven't found a shorter way to get 0 for i*i>=n and nonzero otherwise. In Python 2, one still gets 39 bytes with
f=lambda n,i=1:~-n/i/i and i*i+f(n,i+2)

bool is a subclass of int in Python, which means False is an acceptable value for 0.

Possible duplicate of orlp's answer

PARI/GP, 33 32 26 bytes
Adapted from Dennis' code:
n->t=(1-n^.5)\2*2;(t-t^3)/6

My first idea (30 bytes), using a simple polynomial formula:
n->t=((n-1)^.5+1)\2;(4*t^3-t)/3

This is an efficient implementation, actually not very different from the ungolfed version I would write:
a(n)=
{
  my(t=ceil(sqrtint(n-1)/2));
  t*(4*t^2-1)/3;
}

An alternate implementation (37 bytes) which loops over each of the squares:
n->s=0;t=1;while(t^2<n,s+=t^2;t+=2);s

Another alternate solution (35 bytes) demonstrating summing without a temporary variable:
n->sum(k=1,((n-1)^.5+1)\2,(2*k-1)^2)

Yet another solution, not particularly competitive (40 bytes), using the L2 norm. This would be better if there was support for vectors with step-size indices. (One could imagine the syntax n->norml2([1..((n-1)^.5+1)\2..2]) which would drop 8 bytes.)
n->norml2(vector(((n-1)^.5+1)\2,k,2*k-1))

Python 2, 38 bytes
s=(1-input()**.5)//2*2;print(s-s**3)/6

Based off Dennis's formula, with s==-2*k. Outputs a float. In effect, the input is square rooted, decremented, then rounded up to the next even number.

Julia, 29 bytes
f(n,i=1)=i^2<n?i^2+f(n,i+2):0

This is a recursive function that accepts an integer and returns an integer.
We start an index at 1 and if its square is less than the input, we take the square and add the result of recusing on the index + 2, which ensures that even numbers are skipped, otherwise we return 0.

Julia, 26 bytes
x->sum((r=1:2:x-1)∩r.^2)

This constructs the range of all odd, positive integers below n and the array of the squares of the integers in that range, then computes the sum of the integers in both iterables.
Try it online!

Oracle SQL 11.2, 97 bytes
SELECT NVL(SUM(v),0)FROM(SELECT POWER((LEVEL-1)*2+1,2)v FROM DUAL CONNECT BY LEVEL<:1)WHERE v<:1;

Clojure, 53 bytes
#(reduce +(map(fn[x](* x x))(range 1(Math/sqrt %)2)))

You can check it here: https://ideone.com/WKS4DA

Mathematica 30 bytes
Total[Range[1,Sqrt[#-1],2]^2]&

This unnamed function squares all odd numbers less than the input (Range[1,Sqrt[#-1],2]) and adds them.

PHP, 64 bytes
function f($i){$a=0;for($k=-1;($k+=2)*$k<$i;$a+=$k*$k);echo $a;}

Expanded:
function f($i){
    $a=0;
    for($k=-1; ($k+=2)*$k<$i; $a+=$k*$k);
    echo $a;
}

On every iteration of the for loop, it will add 2 to k and check if k2 is less than $i, if it is add k2 to $a.

R, 60 bytes
function(n){i=s=0;while((2*i+1)^2<n){s=s+(2*i+1)^2;i=i+1};s}

Does exactly as described in challenge, including returning 0 for the n = 1 case.
Degolfed, ';' represents linebreak in R, ignored below:
function(n){         # Take input n
i = s = 0            # Declare integer and sum variables
while((2*i+1)^2 < n) # While the odd square is less than n
s = s + (2*i+1)^2    # Increase sum by odd square
i = i + 1            # Increase i by 1
s}                   # Return sum, end function expression

Vyxal sm, 5 bytes
~∷~∆²

Try it Online!
~     # range 1..n-1 (due to m flag) filtered by
 ∷    # is odd
  ~   # filtered by
   ∆² # is a perfect square
      # sum is taken by s flag

J, 11 bytes
3!1 OR>.@%:

Pretty straightforward. Uses the Dennis formula.
Attempt This Online!

FunStack alpha, 46 bytes
Sum Greater? @0 takewhile Square Inc Double #N

Try it at Replit!
Explanation
Compute the infinite list of odd square numbers:
                  #N  Infinite list of natural numbers
           Double     Each times 2
       Inc            Each plus 1
Square                Each squared

Sum those that are less than the input:
                takewhile  Take elements from the list while this function is true:
             @0             First program argument
    Greater?                is greater than the list element
Sum                        Sum those elements

Scala, 54 bytes
Golfed version. Try it online!
def f(n:Int)=(1 to n by 2).map(x=>x*x).filter(_<n).sum

57 bytes version:
def f(n:Int)=(1 to n by 2).map(x=>x*x).takeWhile(_<n).sum

Thunno 2 S-, 5 bytes
ƭRœɗ²

Thunno 2, 7 bytes
⁻ƭRœɗ²S

Alternatively, a port of Dennis's Jelly answer:
ƭṃ1Æ|3c

Explanation
ƭRœɗ²  # Implicit input
       # - flag decrements the input
ƭ      # Square root of (input - 1)
 R     # Pop and push [1..that]
  œɗ   # Only keep odd numbers
    ²  # Square each number in this list
       # S flag sums the list
       # Implicit output

ƭṃ1Æ|3c  # Implicit input
ƭṃ       # Push ceil(sqrt(input))
  1Æ|    # Bitwise OR with 1
     3c  # Get nCr with r=3
         # Implicit output

Screenshot

Python 3, 61 49 bytes
lambda n:sum(i*i for i in range(1,n,2)if i*i<n)

plenty of savings, thanks for helping me out

Welcome to PPCG! Unnamed functions are acceptable too, so you can omit the c (unless you need it for recursion, which you don't).

@MartinBüttner okay thanks for the help

You can omit the square brackets. This makes it the sum of a generator, which still works.

i**2 is longer than i*i, and you can shorten if i**2<n else 0 by putting the condition at the end: lambda n:sum(i*i for i in range(1,n,2)if i*i<n). You also don't have to show the old code, we can see that in the version history.

Python 2, 49 bytes
This ended up being shorter than a lambda.
x=input()
i=1;k=0
while i*i<x:k+=i*i;i+=2
print k

Try it online
My shortest lambda, 53 bytes:
lambda x:sum((n-~n)**2for n in range(x)if(n-~n)**2<x)

Python, 42 38 bytes
f=lambda n,i=1:i*i<n and i*i+f(n,i+2)

Ruby, 32 bytes
f=->n,i=1{i*i<n ?i*i+f[n,i+2]:0}

Pyke, 7 bytes (noncompetitive)
Add up_to function which repeats until the rtn is above inp.
#}hX)Os

Explanation:
#   )   -  While rtn < input:
        -   i = 0
 }hX    -    rtn = ((i*2)+1)**2
        -   i+=1
     O  -  rtn[:-1]
      s - sum(^)

Try it here!

Factor, 58 57 bytes
[| n | n 2 * iota [ 2 * 1 + 2^ ] map [ n < ] filter sum ]

Well, this was simpler than I thought!
[| n |       ! new local var n
    n 2 *    ! double n
    iota     ! fixnum>range
    [
        2 *  ! double
        1 +  ! + 1
        2^  ! square
    ] map    ! each item in range(0, n*2)
    [
        n <  ! entries over n
    ] filter ! keep-only
    sum ]    ! sum the resulting array

Unit tests, if you like:
{ 0 }  [ 1  sum-odds-lt ] unit-test
{ 1 }  [ 2  sum-odds-lt ] unit-test
{ 1 }  [ 9  sum-odds-lt ] unit-test
{ 10 } [ 10 sum-odds-lt ] unit-test
{ 156849 } [ 9801 sum-odds-lt ] unit-test
{ 166650 } [ 9802 sum-odds-lt ] unit-test
{ 166650 } [ 10000 sum-odds-lt ] unit-test

bash + bc, 86 bytes
s=0
for((n=0;;n++));{
w=`bc<<<"(2*$n+1)^2"`
[ $w -ge $1 ]&&break;
s=$((s+w))
}
echo $s

This piece of code is quite self explaining, as it simply sums up the values. It is not quite a magic code, as formatting it properly helps... The stop condition is not in the header of the loop, but after evaluating the step and before adding, since here we have all the values we need without initalising them beforehand.

Perl 5, 51 50 bytes
-1 byte thanks to TuukkaX.
Not sure if I can golf this more...
$s=0;map{$_%2?$s+=$_**2:()}(1..(<>-1)**.5);print$s

map checks whether the current value in the array [1.. sqrt(input-1)] is odd or even. If it's odd, increase $s with the odd number squared.

I don't know Perl yet, but I'm quite sure you can use .5.

@TuukkaX Indeed it works (I never think of that to be honest.) :)

Pyt, 6 bytes
⁻√ř²ƧƩ

Port of FryAmTheEggman's Jelly answer.
Try it online!

dc, 19 bytes
1-v1+2/dd+1+d2-**3/

This uses the closed-form formula ⅓k(2k+1)(2k-1) for the largest k such that (2k-1)² < n
Ungolfed version
As a full program:
#!/usr/bin/dc -f

?                   # input

1-v1+2/             # k
dd+1+d2-            # k, 2k+1, 2k-1
**3/                # multply

p                   # output


text:
Tips for golfing in MATL
MATL is a golfing language created by Luis Mendo. MATL has proven to be highly competitive, often beating submissions in other golfing languages such as Pyth, CJam and Jelly.
What are some useful tips for golfing in MATL? (As always, one tip per answer, please!)

For the record, MATL can be tested online here.
Documentation can be found on Github

It is definitely a great advantage if you know some Matlab/Octave. Some tricks from Tips for golfing in Matlab and Tips for golfing in Octave used in MATL too.

Suggestion: it looks like accumarray (XQ) can be quite powerful (possibly even more than in MATLAB/Octave since those length function handles have handy numeric codes), but I don't know it well enough to illustrate with good examples. If it actually is useful, could someone create an answer with ideas on how to use it?

Know the predefined literals
Although some of them keep information when copied to the clipboard, they all have a predefined value.

F, pushes 0 (actually False)
T, pushes 1 (actually True)
H, pushes 2 (predefined clipboard value)
I, pushes 3 (predefined clipboard value)
K, pushes 4 (predefined clipboard value)
J, pushes 0 + 1j (predefined clipboard value)

Not sure if I have covered all predefined values though.

Just for completeness (and in case you want to add to your answer):  each level of clipboard L also has a predefined value, but they are intended for special uses (rather than common, general values). For example, 1L gives [1 0] (which is used as index 1:end), 2L gives [0 -1 1] (for 1:-1:end). Also, functions l and O take 0 inputs by default and produce 0 and 1 respectively

I don't see how this is useful... Can't I just write 4?

@Cyoce The usefulness is to avoid a space as separator. If you want to push 1, then 4, 14 won't do. You'd need 1 4. Or 1K to save one byte

@LuisMendo ah, I see. I guess I assumed it was using the 1-digit number only method (not sure why)

Another case when K instead of 4 is handy is: 1-4 means: push 1, then push -4; whereas 1-K means: push 1, subtract from whatever is below in the stack, then push 4

Move things from after the loop to within the loop, to exploit implicit end
Loop end statements, ], can be left out if there is no code after them. They are filled by the MATL parser implicitly.
So if you can move things from after the loop to within the loop you can to save the final ].
As a specific example, the following code finds how many trailing zeros there are in the factorial of a number N (see it here):

The code loops from 1 to N.
For each of those numbers it computes its prime factors, and determines how many times 5 is present.
The answer is the accumulated number of times 5 appears (this works because for each 5 there is at least one 2).

The first idea was :"@Yf5=]vs (note that there are statements after the loop):
:      % Range from 1 to implicit input
"      % For each number in that vector
  @    %   Push that number
  Yf   %   Vector of prime factors (with repetitions)
  5=   %   True for entries that equal `5`, and `false` for the rest
]      % End for
v      % Concatenate all vectors as a column vector
s      % Sum. Implicitly display

Since v by default concatenates all stack contents, it can be moved into the loop. And since addition is associative, s can be moved too. That leaves ] at the end of the code, and thus it can be omitted: :"@Yf5=vs:
:      % Range from 1 to implicit input
"      % For each number in that vector
  @    %   Push that number
  Yf   %   Vector of prime factors (with repetitions)
  5=   %   True for entries that equal `5`, and `false` for the rest
  v    % Concatenate all vectors so far as a column vector
  s    % Sum. Inplicitly end loop and display

i dont know a dime of this hieroglyphic-alike written language but i ll reserve a great part of my time studying it next three months maybe.

@Agawa001 :-) You'll find it's quite similar to Matlab. You can also ask or comment here

The & Meta-Function (Alternative Input / Output Specification)
The traditional way to specify the number of input arguments to pass to a function is to use the $ meta-function
2$:     % Two-input version of :

Similarly, to specify the number of output arguments you can use the # meta-function specifying either the number of output arguments,
2#S     % Two-output version of sort

or if you pass a number that is greater than the number of output arguments defined for a function, only the mod(N, numberOfOutputs) + 1 output is supplied.
4#S     % Get only the second output of sort

You can additionally specify a logical array as the input to # to retrieve only specific output arguments.
TFT#u   % Three output version of unique and discard the second output

All of these input / output specifications are handy but they drive up your byte-count very quickly. To deal with this, MATL introduced the & meta-function in the 17.0.0 release. This & meta-function acts as a shortcut for a particular input or output specification for a function. Let's see what that means.
In our example above, we wanted to use the two-input version of : (creates a vector of equally-spaced values). While the default number of input arguments to : is 1 (creates an array from [1...N]), it is very common that a user would want to specify the start value of the range which requires the second input. So for :, we have defined & to be a shortcut for 2$.
10      % Push 10 to the stack
12      % Push 12 to the stack
2$:     % Create an array: [10, 11, 12]

Now becomes the following, saving a byte!
10 12 &:

How can we determine what the alternate number of arguments is?
The input / output specification that & translates to is function specific such that we optimize the byte-savings.
The input / output argument section of the help description for each function has been updated to indicate what this alternative number of inputs / outputs is (if any). The possible number of input or output arguments are displayed as a range and the default values for each are shown in parentheses. The input / output spec that can be substituted with & is shown after the / character within the parentheses.
Here is the input / output argument section of the help description for :
 +- Min-Max range of # of inputs
 |        +----- Alt. Default # of inputs
 |        |
 V        V
1--3 (1 / 2); 1 <--- Possible / Default # of outputs
      ^
      |
  Default # of inputs

How did you determine what & means for each function?
Very carefully. Using the StackExchange API, we were able to download all MATL answers that have ever been used in a PPCG challenge. By parsing each of the answers, we were then able to determine the frequency with which each input / output spec was used for each function. Using this information we were then able to objectively identify the input / output specification the & meta-function should represent for each function. Sometimes there was no clear winner, so many functions currently don't have & defined.
Here is the script we used (unfortunately it's written in MATLAB and not MATL).
And here is an example of the histogram of $/# usage

This feature was suggested by @Suever. Originally & was going to mean "increase number of inputs by 1 with respect to the default". His suggestion turned out to be much more useful

Get familiar with MATL's truthy/falsy definitions
While true (T) and false (F) clearly represent truthy and falsy output, respectively, the widely agreed upon definition of truthy/falsy gives us a little bit more flexibility in MATL.
The definition states:
if (x)
    disp("x is truthy");
else
    disp("x is falsy");
end

So we can write a quick MATL truthy/falsy test which will loop through all inputs and display whether they were considered to be truthy or falsy
` ? 'truthy' } 'falsey' ]DT

Here is an online version.
What this means in MATL
What this actually translates to in MATL (and therefore in MATLAB and Octave) is that a condition is considered to be true if if it is non-empty and real components of all its values are non-zero. There are two parts to this that should be emphasized.

Non-zero: This means precisely that, not equal to zero (==). This includes positive numbers, negative numbers, non-null characters, etc. You can easily check by converting a given value to a logical value (g) or you can use ~~
F           % Falsy
T           % Truthy
0           % Falsy
1           % Truthy
2           % Truthy
-1          % Truthy
'a'         % Truthy
' '         % Truthy (ASCII 32)
char(0)     % Falsy  (ASCII 0)

All values: Typically we think of scalars as being true or false, but in MATL, we can evaluate scalars, row vectors, column vectors, or even multi-dimensional matrices and they are considered to be truthy if and only if every single value is non-zero (as defined above), otherwise they are falsy. Here are a few examples to demonstrate
[1, 1, 1]           % Truthy
[1, 0, 0]           % Falsey
[1, 1, 1; 1, 1, 1]  % Truthy
[1, 0, 1; 1, 1, 1]  % Falsey
'Hello World'       % Truthy

The one edge case, as mentioned above, is an empty array [], which is always considered to be falsy (example)
How can I use this to golf better?
If the challenge simply mentions that your output should be truthy or falsy, you can likely exploit the definition above to shave a few bytes off of your answer. To save confusion, it is recommended that you include a link to the online truthy/falsy test above in your answer to help explain how MATL truthy/falsy values work.
A couple of specific examples:

An answer ending in A. If the challenge requires a truthy or falsy output and you end your answer in all (A) to create a scalar, you can remove this last byte and your answer will remain correct (unless the output is [] since [] is false but []A is true).
Ensuring that an array contains only one unique value: Uses &= in place of un1=. If all values in an array are equal, a broadcasted element-wise equality comparison will yield an N x N matrix of all ones. If all values are not equal, this matrix will contain some 0 values and therefore be considered falsy.

Implicit Input
Most functions accept some number of input. These inputs are taken from the top of the stack. If the top of the stack does not contain enough arguments, it will draw the remaining argument from the input. (See Section 7.3 in the documentation) I'd like to cite the original explanation:

Implicit inputs can be viewed as follows: the stack is indefinitely extended below
the bottom, that is, at positions 0, −1, −2, ...with values that are not initially
defined, but are resolved on the fly via implicit input. These inputs are asked from
the user only when they are needed, in the order in which they are needed. If
several inputs are required at the same time they follow the normal stack order,
that is, the input that is deepest in the (extended) stack is entered first.

Implicit input is a feature that was suggested by @flawr

@flawr must be a really clever guy. :D

For loop of size n-1
Consider replacing
tnq:"...

with
td"...

to save up to an entire byte or more.

@Luis true! I thought that one might need the original vector that is being looped, but that's not possible in the first approach either. Will remove that remark.

But you don't necessarily save 1 byte; you save 1 or 2 depending on whether you need @ / X@ within the loop or not. Maybe you can just say "to save bytes"

Logical arrays can often be used as numeric arrays
You can often use "TF" notation instead of array literals of zeros and ones. For example, FTF is the same as [0,1,0], only that FTF produces logical values, not double values. This is usually not a problem, as any arithmetical operation will treat logical values as numbers. For example, FTFQ gives [1,2,1] (Q is "increase by 1").
In some cases, conversion of a number to binary may be shorter. For example, [1,0,1], TFT and 5B are the same; again with the caution that the latter two are logical values.

A case where the difference between TF (logical) and [1 0] (numeric) matters is when used as indices. An array of type logical used as an index means: pick elements corresponding to T, discard those corresponding to F. So [10 20]TF) produces 10 (select the first element), whereas [10 20][1 0]) produces [10 20] (the index [1 0] has the interpretation of 1:end, that is, pick all elements of the array).

Some functions are extended compared with MATLAB or Octave
If you come from MATLAB or Octave, you'll find many MATL functions are similar to functions in those languages. But in quite a few of them functionality has been extended.
As an example, consider MATLAB's reshape function, which in MATL corresponds to  e. The code snippets reshape([10 20 30 40 50 60], 2, 3) and reshape([10 20 30 40 50 60], 2, []) respectively mean "reshape the row vector [10 20 30 40 50 60 into a 2×3 matrix", or "into a 2-row matrix with as many columns as needed". So the result, in both cases, is the 2D array
10    30    50
20    40    60

Something like reshape([10 20 30 40 50 60], 2, 2) or reshape([10 20 30 40 50 60], 5, []) would give an error because of incompatible sizes. However, MATL will remove elements in the first case (try it online!) or fill with zeros in the second (try it online!) to produce, respectively,
10 30
20 40

and
10 60
20  0
30  0
40  0
50  0

Other functions that have extended functionality in comparison with their MATLAB counterparts are (non-exhaustive list) S (sort), Yb (strsplit), m (ismember), h (horzcat), v (vertcat), Zd (gcd), Zm (lcm), YS (circshift), YA (dec2base), ZA (base2dec), Z" (blanks).

Shorter way to define an empty numeric array, if the stack is empty
To push an empty numeric array you normally use []. However, if the stack is empty you can save a byte using v. This function by default concatenates all stack contents vertically, so if the stack is empty it produces the empty array.
You can see it in action for example here.

Get the index of the first non-zero element, if any
The f function gives the indices of all non-zero elements of an array. Often you want the index of the first nonzero element. That would be f1): apply f and pick its first element. But if the original array doesn't contain any non-zero value f will output an empty array ([]), and trying to pick its first element will give an error.
A common, more robust requirement is to obtain the index of the first element if there is at least one, and [] otherwise. This could be done with an if branch after f, but that's byte-expensive. A better way is fX<, that is, apply the minimum function X< to the output of f. X< returns an empty array when its input is an empty array.
Try it online! (Note that an empty array is not displayed at all). Or see an example of this  at work here.

Efficiently defining numeric array literals
Here are a few ways that can be used to save bytes when defining numeric array literals. Links are given to example answers that use them. These have been obtained using the analytics script created by @Suever.
Concatenation and predefined literals
For arrays with small numbers you can sometimes use concatenation (functions h and v), as well as predefined literals to avoid using spaces as separators: compare [2 4], 2 4h and 2Kh, all of which define the array [2 4]. Similarly, 2K1v with an empty stack defines [2; 4; 1]. Example.
Letters within numeric array literals
For slightly larger numbers you can save spaces exploiting the fact that some letters have numeric meanings within array literals. So instead of [3 5 2 7;-4 10 12 5] you can use [IAHC;dX12A]. Example.
Specifically, within array literals,

O, l, H I K have their usual meanings 0, ..., 4
A, ..., E mean 5, ..., 9
X means 10
a, ... d mean -1, ..., -4
J and G mean 1j and -1j
P means pi
Y means inf
N means NaN.

String and consecutive differences
For larger numbers, defining a string and computing its consecutive differences (with d) can help: instead of [20 10 35 -6] you can use '!5?b\'d. This works because d uses the code points of the chars for computing the differences. Example.

Generate a range as long as a given array
TL;WR: use f instead of n: if the array only has nonzero elements.

It is often the case that one needs to generate an array [1 2 ... L] where L is the number of elements of a given array. The standard way to do that is n:. For example, the code tn:* takes a numeric vector as input and computes each entry multiplied by its index.
If the given array is guaranteed to only contain nonzero entries (for example, it is formed by positive integers, or is a string with printable characters), n: can be replaced by f, which produces an array with the indices of nonzero entries. So the above code becomes tf*, which saves 1 byte.
Some more elaborate examples: 1, 2, 3.