Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

66%
+2 −0
Challenges Count polyomino bisections

An polyomino is a non-empty connected subset of the square tiling consisting of squares joined along their edges. We will not require that polyominos be simply connected, that is they can have hole...

0 answers  ·  posted 1y ago by WheatWizard‭

#1: Initial revision by user avatar WheatWizard‭ · 2023-06-17T18:44:08Z (over 1 year ago)
Count polyomino bisections
An polyomino is a non-empty connected subset of the square tiling consisting of squares joined along their edges. We will not require that polyominos be simply connected, that is they can have holes.

A bisection of a polyomino $X$ is a pair of polyominos such that they can be joined together without overlap to form $X$.

For example

```
XXXX
  XXX
   X
```

Can be bisected into:

```
XXX
```
and
```
 X
XXX
 X
```

since they can be joined as follows:

```
1112
  222
   2
```

# Task

Your task is to take a polyomino as input and output the number of distinct bisections which can be made. Two bisections are distinct if the border between the parts is distinct. So

```
11
22
```

and
```
12
12
```

Are distinct bisections even though they share a rotational symmetry. But

```
11
22
```

and

```
22
11
```

are not distinct because the only difference is how you label the two parts.

This is code golf the goal is to minimize the size of your source code as measured in bytes

## Test cases

```
X -> 0

XX -> 1

XXX -> 2

XXXX -> 3

XXXX -> 4
 X

XXXX -> 8
 XX

XX -> 6
XX

XX  -> 6
X X
XXX

XXX -> 28
X X
XXX
```