Skip to main content
Golfed heavily.
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Brachylog (newer), 11 1010 6 bytes

h"a"&ḅlᵐ=Ċo?ḅĊlᵛ

Try it online!Try it online!

The predicate succeeds if the input is in L and fails otherwise.

h"a"          The first character of the input is a.
    &         And,
     ḅlᵐ      the run lengths
        =Ċ    are two equal values.
              (which are output, but we don't need to care about that)
          The input
o         sorted
 ?        is the input,
  ḅ       and the runs in the input
   Ċ      of which there are two
    lᵛ    have the same length.

Brachylog (newer), 11 10 bytes

h"a"&ḅlᵐ=Ċ

Try it online!

The predicate succeeds if the input is in L and fails otherwise.

h"a"          The first character of the input is a.
    &         And,
     ḅlᵐ      the run lengths
        =Ċ    are two equal values.
              (which are output, but we don't need to care about that)

Brachylog (newer), 11 10 6 bytes

o?ḅĊlᵛ

Try it online!

The predicate succeeds if the input is in L and fails otherwise.

          The input
o         sorted
 ?        is the input,
  ḅ       and the runs in the input
   Ċ      of which there are two
    lᵛ    have the same length.
Exploits guarantee that the input is just a bunch of as and bs
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Brachylog (newer), 1111 10 bytes

d"ab"&ḅlᵐ=Ċh"a"&ḅlᵐ=Ċ

Try it online!Try it online!

The predicate succeeds if the input is in L and fails otherwise.

d              Withh"a" duplicate characters removed,
 "ab"      The first character of the input is "ab"a.
     &         And,
      ḅlᵐ      the run lengths
         =Ċ    are two equal values.
               (which are output, but we don't need to care about that)

Brachylog (newer), 11 bytes

d"ab"&ḅlᵐ=Ċ

Try it online!

The predicate succeeds if the input is in L and fails otherwise.

d              With duplicate characters removed,
 "ab"          the input is "ab".
     &         And,
      ḅlᵐ      the run lengths
         =Ċ    are two equal values.
               (which are output, but we don't need to care about that)

Brachylog (newer), 11 10 bytes

h"a"&ḅlᵐ=Ċ

Try it online!

The predicate succeeds if the input is in L and fails otherwise.

h"a"          The first character of the input is a.
    &         And,
     ḅlᵐ      the run lengths
        =Ċ    are two equal values.
              (which are output, but we don't need to care about that)
Source Link
Unrelated String
  • 23k
  • 3
  • 32
  • 55

Brachylog (newer), 11 bytes

d"ab"&ḅlᵐ=Ċ

Try it online!

The predicate succeeds if the input is in L and fails otherwise.

d              With duplicate characters removed,
 "ab"          the input is "ab".
     &         And,
      ḅlᵐ      the run lengths
         =Ċ    are two equal values.
               (which are output, but we don't need to care about that)