text:
Are these two DFAs equivalent?
Two Deterministic Finite Automata or DFAs can be checked to see if they accept same set of strings in polynomial time.  See section 3.3 of this for a long list of methods and this SO question/answer for a much shorter list.
Input
Your input will be two DFAs. In order to be able to test your code, I have provided DFAs in the following format. This is taken  directly from GAP (and slightly simplified).
Automaton( Type, Size, Alphabet, TransitionTable, Initial, Accepting )

For the input, Type will always be "det".  Size is a positive integer representing the number of states of the automaton. Alphabet is the number of letters of the alphabet. TransitionTable is the transition matrix. The entries are non-negative integers not greater than the size of the automaton. We may write a 0 to mean that no transition is present.  Initial and Accepting are, respectively, the lists of initial and accepting states.  You can assume there will be exactly one initial state.
For example:
Automaton("det",4,2,[ [ 1, 3, 4, 0 ], [ 1, 2, 3, 4 ] ],[ 3 ],[ 2, 3, 4 ])

This has transition table:
   |  1  2  3  4
-----------------
 a |  1  3  4
 b |  1  2  3  4
Initial state:    [ 3 ]
Accepting states: [ 2, 3, 4 ]

And diagram:

It is equivalent to:
Automaton("det",3,2,[ [ 1, 3, 1 ], [ 1, 2, 3 ] ],[ 2 ],[ 2, 3 ])

which has diagram:

In order to remove parsing as a significant part of this challenge, you are free to perform trivial parsing of the input format before giving it to your code. This means you can delete any part or parts, reorder and change one type of bracket to another before passing the input to your code. For example, the previous example can be given as
3,2,[ [ 1, 3, 1 ], [ 1, 2, 3 ] ],[ 2 ],[ 2, 3 ]

if that helps.
Here is a more complicated example,
Automaton("det",6,4,[ [ 0, 2, 3, 5, 0, 0 ], [ 1, 3, 5, 0, 0, 0 ], [ 1, 3, 5, 6, 0, 0 ], [ 2, 3, 5, 0, 0, 0 ] ],[ 1 ],[ 1, 4, 5, 6 ])

has diagram:

It is equivalent to:
Automaton("det",5,4,[ [ 2, 2, 2, 4, 5 ], [ 2, 2, 3, 1, 4 ], [ 2, 2, 3, 1, 4 ], [ 2, 2, 5, 1, 4 ] ],[ 3 ],[ 1, 3 ])

with diagram:

More examples of equivalent DFAs
1.
Automaton("det",18,4,[ [ 2, 2, 6, 10, 2, 6, 7, 16, 14, 10, 18, 14, 7, 14, 15, 16, 7, 18 ], [ 3, 3, 7, 11, 3, 7, 15, 11, 7, 17, 15, 18\
, 18, 7, 15, 17, 15, 15 ], [ 4, 4, 8, 7, 4, 13, 15, 15, 16, 7, 8, 7, 15, 7, 15, 15, 16, 13 ], [ 5, 5, 9, 12, 5, 14, 7, 13, 9, 14, 17, 12, \
13, 14, 15, 7, 17, 7 ] ],[ 1 ],[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18 ])

Automaton("det",16,4,[ [ 1, 2, 15, 15, 5, 6, 7, 7, 6, 2, 16, 12, 12, 16, 15, 16 ], [ 1, 3, 1, 7, 9, 15, 1, 1, 15, 8, 7, 3, 8, 15, 1, \
15 ], [ 1, 1, 2, 1, 13, 4, 4, 10, 10, 1, 15, 15, 15, 2, 1, 15 ], [ 1, 15, 3, 4, 5, 16, 15, 3, 14, 4, 11, 16, 11, 14, 15, 16 ] ],[ 5 ],[ 2,\
 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ])

  2.

Automaton("det",50,4,[ [ 2, 2, 9, 13, 17, 9, 13, 17, 9, 24, 28, 30, 13, 33, 36, 30, 17, 9, 13, 9, 13, 39, 30, 24, 25, 44, 42, 28, 24, 30, 47, 39, 33, 50, 36, 36, 42, 46, 39, 25, 24, 42, 43, 44, 36, 46, 47, 42, 25, 50 ], [ 3, 6, 10, 14, 18, 10, 14, 20, 10, 25, 14, 10, 32, 34, 34, 38, 20, 10, 14, 10, 14, 38, 10, 25, 43, 34, 25, 45, 46, 10, 32, 49, 34, 43, 34, 49, 50, 50, 49, 50, 46, 25, 43, 49, 49, 50, 45, 50, 43, 43 ], [ 4, 7, 11, 15, 19, 11, 15, 21, 22, 26, 26, 31, 15, 11, 25, 15, 21, 11, 15, 11, 15, 40, 15, 40, 43, 43, 44, 26, 26, 15, 44, 31, 41, 26, 47, 25, 25, 22, 40, 43, 40, 25, 43, 43, 47, 41, 44, 44, 44, 40 ], [ 5, 8, 12, 16, 5, 12, 16, 8, 23, 27, 29, 12, 23, 35, 37, 16, 8, 12, 16, 12, 16, 41, 23, 42, 25, 40, 27, 27, 29, 23, 48, 45, 37, 49, 35, 42, 37, 48, 42, 40, 41, 42, 43, 25, 45, 37, 27, 48, 49, 25 ] ],[ 1 ],[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50 ])

Automaton("det",39,4,[ [ 1, 2, 3, 3, 5, 24, 7, 8, 22, 20, 8, 32, 18, 18, 3, 19, 25, 18, 19, 20, 25, 22, 23, 24, 25, 25, 24, 23, 5, 2, 35, 32, 19, 19, 35, 36, 36, 36, 36 ], [ 1, 38, 1, 23, 15, 9, 11, 26, 23, 28, 26, 10, 9, 26, 1, 3, 22, 26, 3, 28, 22, 23, 1, 15, 3, 3, 15, 1, 28, 27, 10, 27, 23, 23, 38, 15, 28, 15, 28 ], [ 1, 5, 1, 1, 1, 4, 12, 6, 6, 31, 31, 37, 37, 30, 5, 5, 29, 37, 3, 21, 4, 21, 4, 4, 4, 29, 30, 29, 1, 5, 29, 37, 5, 3, 29, 3, 3, 2, 2 ], [ 1, 16, 3, 4, 3, 21, 7, 18, 33, 39, 14, 13, 13, 14, 15, 16, 17, 18, 19, 34, 21, 34, 3, 19, 19, 16, 38, 15, 4, 33, 17, 18, 33, 34, 16, 19, 34, 38, 39 ] ],[ 7 ],[ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ])

3.
Automaton("det",288,4,[[2, 6, 10, 14, 18, 6, 10, 14, 18, 25, 29, 33, 36, 40, 43, 46, 36, 53, 10, 14, 18, 10, 14, 18, 25, 29, 60, 36, 29, 67, 71, 75, 77, 81, 83, 87, 88, 90, 94, 40, 98, 46, 104, 108, 111, 46, 116, 120, 75, 123, 127, 129, 53, 10, 14, 131, 129, 71, 75, 136, 140, 143, 146, 87, 149, 75, 67, 68, 155, 153, 156, 159, 161, 163, 75, 165, 77, 170, 81, 172, 81, 67, 88, 123, 156, 146, 87, 88, 156, 90, 183, 186, 188, 87, 90, 183, 94, 192, 143, 197, 199, 116, 75, 104, 108, 204, 172, 108, 208, 120, 127, 159, 90, 199, 163, 159, 215, 156, 149, 120, 153, 217, 123, 218, 131, 221, 127, 159, 87, 123, 225, 88, 155, 67, 165, 136, 227, 143, 221, 123, 218, 221, 143, 68, 67, 88, 123, 127, 143, 217, 68, 67, 153, 154, 155, 156, 234, 235, 159, 120, 161, 237, 143, 217, 165, 143, 241, 199, 188, 242, 197, 75, 67, 165, 241, 217, 248, 250, 172, 146, 221, 161, 225, 234, 111, 186, 153, 75, 217, 75, 188, 192, 257, 188, 68, 120, 90, 186, 127, 90, 208, 146, 221, 259, 140, 120, 235, 208, 165, 262, 199, 188, 68, 120, 215, 267, 217, 218, 250, 83, 75, 165, 75, 215, 225, 208, 234, 71, 149, 153, 75, 235, 208, 234, 67, 265, 272, 233, 241, 143, 120, 242, 257, 155, 153, 143, 153, 248, 267, 250, 116, 120, 75, 237, 71, 235, 250, 163, 259, 227, 153, 262, 67, 75, 155, 233, 272, 265, 116, 241, 281, 272, 68, 149, 120, 155, 283, 163, 67, 208, 285, 265, 287, 233, 285, 68, 287, 68], [3, 7, 11, 15, 19, 7, 11, 15, 22, 26, 30, 15, 37, 41, 44, 47, 50, 54, 11, 15, 19, 11, 15, 22, 26, 30, 61, 37, 30, 68, 72, 30, 78, 47, 84, 26, 30, 91, 37, 96, 99, 102, 105, 109, 112, 115, 117, 109, 122, 124, 128, 130, 54, 11, 15, 130, 132, 72, 30, 137, 141, 122, 147, 132, 150, 30, 68, 154, 109, 68, 157, 109, 162, 164, 30, 166, 168, 99, 102, 173, 175, 176, 177, 124, 128, 147, 132, 30, 72, 168, 184, 115, 189, 132, 96, 99, 37, 166, 195, 96, 99, 201, 150, 105, 109, 205, 164, 109, 154, 109, 157, 109, 211, 112, 213, 109, 154, 72, 109, 195, 208, 215, 124, 208, 130, 150, 166, 224, 26, 124, 157, 30, 226, 217, 166, 115, 213, 150, 30, 124, 208, 150, 195, 208, 176, 177, 124, 72, 224, 208, 233, 217, 68, 154, 195, 214, 195, 208, 109, 109, 236, 117, 195, 208, 214, 195, 201, 99, 173, 166, 168, 177, 68, 246, 213, 215, 68, 251, 173, 147, 150, 254, 166, 195, 99, 175, 208, 30, 215, 122, 164, 166, 251, 173, 154, 195, 78, 258, 166, 168, 154, 147, 150, 260, 141, 226, 217, 154, 214, 254, 184, 263, 154, 195, 154, 109, 208, 208, 269, 84, 177, 246, 150, 154, 166, 215, 195, 166, 150, 208, 150, 208, 215, 195, 215, 213, 195, 208, 213, 150, 195, 166, 254, 109, 68, 224, 233, 68, 109, 236, 201, 226, 150, 213, 166, 208, 277, 117, 278, 213, 233, 236, 215, 279, 195, 208, 224, 201, 117, 280, 254, 195, 208, 109, 109, 226, 213, 213, 215, 215, 277, 280, 195, 208, 236, 233, 195, 208], [4, 8, 12, 16, 20, 8, 12, 16, 23, 27, 31, 34, 38, 42, 12, 48, 51, 55, 12, 16, 20, 12, 16, 23, 56, 58, 62, 51, 65, 69, 73, 76, 79, 69, 85, 42, 89, 92, 95, 42, 100, 48, 106, 31, 113, 48, 118, 68, 48, 125, 48, 51, 55, 12, 16, 62, 51, 133, 135, 138, 56, 144, 62, 148, 151, 48, 144, 154, 154, 155, 69, 118, 154, 69, 48, 161, 79, 171, 69, 174, 69, 69, 178, 180, 69, 85, 148, 138, 182, 92, 95, 155, 135, 42, 92, 95, 148, 193, 76, 198, 200, 118, 48, 202, 58, 62, 206, 207, 69, 209, 210, 89, 92, 200, 135, 178, 216, 69, 174, 68, 68, 138, 202, 65, 219, 222, 48, 118, 148, 56, 138, 118, 154, 69, 155, 138, 228, 144, 206, 106, 229, 174, 144, 154, 144, 138, 202, 48, 144, 138, 154, 144, 68, 154, 154, 69, 228, 133, 152, 165, 154, 69, 182, 240, 155, 135, 155, 200, 135, 243, 198, 210, 244, 155, 165, 152, 249, 144, 206, 219, 252, 154, 178, 255, 113, 155, 155, 210, 240, 135, 135, 65, 151, 48, 155, 209, 92, 155, 210, 92, 244, 62, 206, 138, 202, 68, 151, 144, 161, 68, 200, 135, 265, 165, 266, 73, 152, 207, 144, 62, 48, 161, 76, 249, 138, 69, 271, 133, 73, 265, 135, 151, 144, 266, 144, 155, 182, 133, 155, 182, 161, 274, 151, 161, 265, 135, 155, 266, 151, 144, 138, 161, 275, 69, 73, 276, 144, 135, 138, 249, 68, 68, 244, 135, 161, 151, 144, 155, 138, 155, 151, 144, 155, 151, 161, 161, 249, 69, 69, 244, 144, 155, 271, 276, 144, 155, 266, 265], [5, 9, 13, 17, 21, 9, 13, 17, 24, 28, 32, 35, 39, 28, 45, 49, 52, 9, 13, 17, 21, 13, 17, 24, 57, 59, 63, 64, 66, 70, 74, 32, 80, 82, 86, 28, 32, 93, 39, 97, 101, 103, 107, 110, 114, 66, 119, 121, 49, 126, 49, 52, 9, 13, 17, 63, 64, 134, 59, 139, 142, 145, 63, 64, 152, 66, 153, 68, 144, 70, 158, 160, 151, 134, 66, 167, 169, 101, 134, 59, 70, 82, 179, 181, 82, 86, 64, 66, 74, 169, 185, 187, 190, 97, 191, 101, 64, 194, 196, 191, 101, 160, 103, 203, 160, 63, 103, 121, 195, 110, 179, 110, 212, 114, 214, 167, 213, 134, 160, 153, 121, 158, 203, 187, 220, 223, 66, 119, 57, 142, 139, 59, 151, 134, 187, 66, 214, 152, 66, 107, 230, 231, 153, 144, 145, 139, 203, 103, 232, 187, 151, 152, 153, 154, 68, 70, 214, 187, 121, 160, 68, 238, 239, 230, 70, 214, 187, 101, 59, 194, 169, 179, 245, 247, 214, 232, 70, 152, 66, 220, 253, 144, 194, 196, 101, 70, 187, 194, 256, 190, 231, 66, 152, 66, 195, 196, 80, 247, 194, 169, 213, 63, 103, 139, 203, 261, 152, 68, 239, 121, 185, 264, 213, 214, 68, 268, 121, 121, 145, 63, 139, 270, 223, 195, 66, 238, 239, 187, 74, 230, 231, 121, 266, 153, 232, 195, 236, 273, 70, 74, 239, 66, 121, 268, 245, 119, 247, 153, 144, 153, 187, 270, 253, 195, 167, 230, 232, 119, 66, 70, 261, 153, 256, 264, 236, 144, 266, 273, 158, 247, 144, 68, 273, 121, 167, 282, 195, 70, 158, 284, 266, 286, 236, 288, 68, 286, 68, 288]],[1],[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288])

Automaton("det",266,4,[[1, 127, 50, 50, 115, 249, 50, 8, 257, 10, 151, 12, 13, 14, 81, 78, 34, 106, 137, 107, 21, 22, 82, 89, 71, 43, 43, 62, 63, 63, 44, 10, 179, 171, 214, 265, 206, 38, 137, 152, 21, 151, 71, 22, 41, 41, 47, 13, 49, 50, 50, 210, 50, 210, 116, 90, 64, 49, 207, 207, 207, 62, 232, 64, 64, 89, 151, 236, 236, 70, 71, 236, 116, 260, 128, 75, 13, 38, 77, 133, 14, 82, 13, 13, 77, 235, 64, 64, 231, 206, 138, 91, 91, 206, 90, 264, 137, 169, 10, 10, 41, 71, 232, 228, 232, 21, 21, 107, 106, 110, 111, 266, 256, 114, 114, 116, 251, 251, 116, 114, 114, 111, 266, 260, 122, 182, 127, 128, 129, 213, 132, 132, 129, 49, 49, 138, 138, 138, 249, 71, 43, 43, 210, 235, 183, 214, 132, 265, 206, 138, 232, 64, 64, 153, 153, 64, 152, 152, 82, 236, 236, 82, 116, 116, 64, 207, 266, 64, 231, 169, 171, 250, 227, 70, 175, 175, 176, 10, 47, 178, 178, 110, 111, 266, 260, 122, 266, 127, 213, 49, 49, 152, 257, 153, 257, 90, 90, 183, 250, 264, 62, 228, 229, 82, 82, 206, 64, 266, 249, 249, 249, 242, 213, 214, 64, 116, 114, 114, 50, 50, 236, 236, 261, 115, 152, 251, 8, 228, 229, 229, 231, 232, 237, 235, 235, 236, 237, 235, 235, 235, 235, 235, 235, 242, 242, 242, 115, 251, 249, 250, 116, 116, 116, 207, 64, 265, 266, 257, 256, 266, 264, 261, 260, 264, 265, 266], [1, 125, 1, 114, 114, 121, 115, 3, 23, 19, 13, 15, 230, 28, 201, 202, 16, 84, 123, 103, 105, 208, 114, 84, 172, 199, 199, 119, 83, 83, 123, 170, 16, 31, 27, 26, 25, 104, 102, 23, 28, 13, 120, 208, 48, 103, 19, 230, 239, 1, 114, 218, 115, 219, 82, 140, 23, 208, 204, 216, 216, 119, 174, 119, 119, 84, 13, 115, 115, 50, 120, 50, 82, 204, 262, 79, 230, 104, 203, 85, 28, 114, 230, 230, 203, 3, 23, 119, 96, 96, 96, 123, 102, 140, 208, 3, 200, 200, 98, 97, 103, 120, 119, 120, 119, 28, 105, 103, 105, 54, 3, 23, 141, 1, 250, 50, 82, 114, 50, 1, 250, 3, 3, 219, 219, 125, 54, 263, 124, 124, 27, 124, 223, 208, 239, 25, 208, 208, 120, 120, 217, 217, 217, 120, 120, 142, 142, 141, 140, 140, 174, 174, 174, 204, 216, 23, 119, 23, 250, 114, 114, 250, 162, 162, 159, 205, 159, 159, 208, 123, 170, 1, 219, 50, 208, 208, 123, 177, 177, 19, 170, 173, 172, 172, 199, 199, 23, 186, 185, 184, 184, 23, 120, 216, 23, 140, 208, 120, 1, 3, 119, 120, 114, 114, 250, 239, 119, 3, 121, 3, 120, 219, 212, 212, 23, 50, 1, 250, 1, 114, 50, 114, 219, 114, 23, 114, 3, 120, 114, 114, 208, 119, 125, 121, 3, 50, 54, 120, 3, 120, 121, 3, 120, 218, 219, 217, 114, 114, 3, 1, 250, 250, 250, 253, 252, 173, 172, 120, 125, 3, 3, 219, 219, 3, 54, 3], [1, 1, 249, 249, 6, 1, 1, 247, 7, 130, 167, 17, 11, 66, 33, 33, 131, 136, 10, 32, 150, 9, 112, 36, 149, 112, 149, 56, 167, 37, 181, 130, 35, 147, 139, 51, 139, 11, 10, 234, 147, 37, 148, 113, 136, 136, 146, 24, 249, 1, 1, 249, 249, 249, 139, 6, 238, 127, 134, 238, 134, 9, 148, 238, 134, 167, 36, 50, 249, 247, 73, 249, 51, 139, 112, 167, 76, 76, 11, 167, 80, 73, 67, 66, 66, 135, 58, 58, 112, 139, 233, 100, 100, 2, 6, 95, 10, 32, 130, 130, 99, 94, 94, 56, 149, 150, 147, 150, 136, 51, 51, 51, 7, 51, 51, 51, 7, 6, 139, 139, 139, 2, 58, 134, 139, 7, 1, 112, 112, 249, 238, 238, 112, 249, 127, 238, 233, 238, 1, 149, 112, 149, 249, 135, 7, 139, 238, 51, 139, 238, 112, 238, 233, 234, 234, 134, 234, 190, 112, 50, 249, 73, 139, 51, 238, 134, 51, 134, 148, 32, 147, 145, 145, 145, 258, 259, 180, 130, 146, 189, 189, 51, 51, 134, 134, 139, 2, 1, 249, 127, 249, 191, 191, 191, 188, 188, 188, 188, 198, 197, 196, 196, 195, 187, 187, 139, 233, 134, 127, 127, 127, 49, 249, 139, 243, 211, 211, 211, 210, 210, 210, 210, 95, 209, 241, 209, 126, 117, 117, 9, 112, 112, 50, 50, 50, 50, 50, 50, 49, 49, 127, 127, 127, 249, 249, 249, 7, 7, 1, 247, 51, 139, 211, 134, 134, 51, 51, 7, 7, 2, 126, 145, 139, 247, 51, 51], [1, 51, 3, 4, 4, 7, 7, 50, 73, 61, 11, 12, 40, 109, 101, 93, 45, 18, 19, 20, 21, 64, 161, 29, 193, 118, 193, 65, 11, 42, 19, 59, 30, 46, 163, 164, 163, 40, 39, 57, 46, 42, 246, 60, 18, 21, 61, 158, 72, 50, 51, 53, 53, 3, 55, 55, 57, 246, 156, 64, 65, 64, 155, 64, 65, 11, 29, 68, 69, 236, 160, 72, 73, 55, 157, 11, 154, 154, 40, 11, 46, 160, 225, 192, 192, 86, 87, 88, 157, 118, 155, 19, 39, 74, 161, 239, 92, 92, 166, 254, 20, 144, 88, 240, 65, 109, 108, 21, 21, 50, 50, 73, 73, 50, 247, 236, 73, 161, 72, 3, 5, 54, 86, 239, 3, 51, 50, 64, 64, 161, 165, 64, 157, 161, 245, 165, 60, 64, 51, 240, 161, 240, 4, 144, 51, 55, 57, 73, 55, 57, 157, 157, 155, 57, 64, 156, 64, 87, 118, 160, 161, 248, 163, 164, 165, 168, 164, 168, 60, 19, 108, 3, 3, 72, 64, 60, 19, 194, 194, 61, 59, 247, 247, 193, 193, 5, 74, 7, 69, 244, 69, 156, 240, 65, 74, 74, 246, 143, 219, 86, 88, 144, 222, 222, 226, 72, 60, 239, 52, 54, 143, 239, 72, 72, 215, 221, 219, 224, 219, 220, 221, 222, 239, 220, 215, 222, 54, 160, 160, 161, 64, 64, 160, 68, 236, 236, 236, 160, 239, 240, 244, 245, 246, 69, 72, 161, 51, 160, 50, 50, 248, 118, 226, 255, 255, 248, 248, 160, 160, 245, 245, 72, 72, 236, 236, 236]],[12],[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266])

4.
Automaton("det",9,4,[[1, 1, 2, 3, 1, 1, 2, 5, 2], [1, 1, 2, 8, 2, 2, 1, 6, 2], [1, 1, 2, 7, 2, 1, 2, 2, 2], [1, 1, 2, 9, 1, 1, 1, 1, 1]],[4],[2, 6])

Automaton("det",100,4,[[0, 1, 3, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 36, 37, 40, 41, 42, 43, 44, 45, 46, 47, 48, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 71, 72, 73, 78, 79, 81, 84, 85, 86, 90, 93, 94, 95, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 4, 6, 7, 9, 10, 11, 12, 13, 15, 16, 19, 20, 21, 22, 23, 24, 25, 27, 28, 30, 31, 32, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 64, 66, 67, 69, 70, 71, 75, 76, 78, 80, 81, 84, 85, 86, 87, 89, 92, 93, 95, 96, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 22, 23, 26, 28, 29, 30, 32, 34, 35, 38, 40, 41, 45, 47, 49, 50, 53, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 76, 77, 79, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 19, 21, 22, 23, 24, 26, 27, 28, 32, 33, 34, 35, 39, 40, 42, 43, 46, 47, 51, 54, 55, 59, 60, 61, 63, 64, 67, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 84, 85, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],[39],[1, 2, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 28, 30, 31, 33, 35, 37, 41, 42, 43, 44, 49, 50, 52, 53, 57, 61, 63, 65, 66, 67, 69, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 100])

5.
A pair of equivalent DFAs
Non-equivalent DFAs

Automaton("det",100,4,[[0, 1, 2, 3, 5, 7, 9, 12, 13, 15, 20, 21, 23, 24, 25, 27, 29, 30, 31, 33, 34, 35, 36, 37, 40, 41, 42, 45, 46, 47, 48, 56, 57, 60, 62, 64, 65, 69, 70, 73, 74, 76, 80, 81, 82, 84, 86, 87, 88, 89, 90, 92, 93, 94, 95, 97, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 9, 11, 12, 13, 16, 19, 20, 21, 22, 23, 24, 25, 26, 27, 30, 36, 37, 38, 39, 40, 42, 47, 49, 52, 53, 54, 59, 60, 61, 62, 63, 64, 65, 68, 69, 71, 72, 75, 76, 78, 81, 82, 84, 86, 87, 88, 89, 90, 91, 92, 95, 96, 97, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 24, 25, 26, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 41, 43, 46, 50, 51, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 70, 73, 74, 76, 77, 78, 80, 83, 86, 87, 89, 91, 92, 93, 95, 98, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 4, 6, 8, 13, 14, 15, 17, 19, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 35, 36, 37, 40, 42, 46, 47, 48, 50, 51, 53, 54, 56, 58, 60, 61, 63, 64, 65, 66, 68, 70, 71, 72, 74, 75, 76, 79, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 95, 96, 97, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],[52],[1, 5, 6, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 44, 46, 47, 49, 51, 52, 53, 54, 55, 60, 61, 62, 66, 67, 70, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 86, 87, 89, 90, 92, 94, 96, 97, 98, 99, 100])

Automaton("det",100,4,[[0, 2, 3, 4, 6, 7, 10, 11, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38, 40, 42, 43, 44, 46, 48, 49, 51, 55, 56, 57, 58, 59, 61, 62, 63, 64, 69, 71, 72, 73, 76, 78, 79, 80, 83, 86, 87, 88, 89, 90, 91, 95, 96, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 17, 18, 19, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 40, 41, 42, 43, 45, 47, 48, 50, 51, 53, 56, 57, 59, 60, 62, 63, 64, 71, 72, 73, 75, 76, 77, 79, 80, 83, 85, 86, 87, 89, 90, 91, 92, 93, 96, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 21, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 45, 47, 48, 50, 51, 52, 53, 56, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 75, 76, 78, 79, 80, 82, 84, 85, 86, 89, 90, 93, 94, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 21, 22, 23, 24, 28, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 45, 47, 48, 51, 52, 53, 56, 57, 59, 60, 61, 62, 63, 64, 65, 67, 70, 74, 76, 83, 84, 86, 88, 90, 91, 93, 94, 95, 96, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],[17],[1, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 19, 22, 23, 27, 28, 29, 30, 32, 35, 36, 38, 40, 41, 42, 44, 46, 47, 48, 50, 51, 53, 54, 55, 62, 64, 66, 71, 72, 74, 75, 76, 79, 83, 86, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100])

Automaton("det",100,4,[[2, 3, 6, 7, 8, 9, 10, 12, 14, 15, 16, 20, 21, 25, 26, 28, 29, 30, 32, 35, 36, 37, 40, 42, 43, 44, 46, 47, 48, 50, 53, 54, 55, 57, 58, 59, 62, 63, 64, 65, 67, 68, 69, 72, 73, 75, 77, 79, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 4, 5, 8, 13, 14, 15, 17, 18, 19, 20, 22, 23, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 58, 59, 60, 63, 64, 65, 66, 67, 68, 70, 71, 72, 74, 75, 77, 78, 79, 82, 83, 84, 85, 86, 87, 93, 95, 96, 97, 98, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 3, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 27, 28, 30, 31, 32, 37, 38, 40, 41, 42, 45, 47, 49, 50, 51, 52, 56, 59, 61, 63, 64, 65, 68, 70, 72, 73, 74, 76, 77, 78, 80, 81, 85, 86, 87, 88, 92, 93, 94, 96, 98, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 20, 21, 22, 23, 24, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 48, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 62, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 79, 84, 86, 91, 92, 93, 96, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],[46],[1, 2, 7, 8, 10, 12, 13, 15, 17, 18, 20, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 35, 36, 37, 39, 41, 42, 44, 45, 47, 49, 50, 51, 52, 54, 55, 57, 59, 61, 63, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 79, 80, 81, 82, 85, 86, 88, 91, 92, 93, 94, 95, 96, 97, 98])

Automaton("det",100,4,[[0, 1, 4, 5, 7, 8, 9, 10, 11, 12, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33, 35, 36, 37, 39, 43, 44, 45, 46, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 62, 63, 67, 68, 70, 72, 73, 74, 76, 77, 78, 81, 82, 83, 85, 87, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 3, 4, 5, 8, 10, 12, 15, 16, 17, 18, 19, 20, 21, 27, 29, 30, 31, 32, 34, 35, 36, 39, 40, 42, 45, 46, 47, 49, 50, 51, 52, 55, 58, 59, 60, 61, 62, 63, 64, 66, 67, 70, 71, 72, 73, 74, 75, 77, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89, 92, 94, 96, 98, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 2, 3, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 20, 21, 23, 30, 31, 33, 34, 35, 37, 38, 39, 42, 43, 44, 46, 47, 48, 50, 52, 53, 54, 55, 56, 58, 59, 60, 61, 63, 64, 65, 66, 67, 70, 71, 75, 76, 77, 80, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 94, 98, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 3, 4, 7, 8, 9, 10, 11, 12, 14, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29, 31, 33, 34, 35, 37, 38, 40, 41, 43, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 62, 64, 65, 66, 67, 68, 69, 71, 72, 75, 76, 77, 80, 81, 82, 83, 86, 87, 88, 91, 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],[45],[2, 4, 6, 7, 11, 12, 14, 15, 16, 17, 19, 20, 24, 25, 27, 28, 29, 30, 37, 39, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 71, 72, 76, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 94, 95, 99, 100])

Score
This question is code-golf and restricted-time.  Your code must be able to run all the test cases in less than a minute on TIO.  Your code only needs to output something Truthy or Falsey depending on whether the two DFAs are equivalent or not.
[GAP has a library function for this but I am not aware of any other languages that do.  Please feel free to use whatever your language does provide however.]

"list of initial states"? There's usually exactly one initial state, and all examples have one initial state.

@aschepler Yes . I have added a comment to make it clear you can assume there will be exactly one initial state.

Wait, it's currently a two-part code golf: (parse the GAP syntax) + (test if the two DFAs are equivalent). I don't think it's a good idea.

Well, GAPs Automata package has AreEquivAut, but the description doesn't sound fast for big automata: check that corresponding minimal automata are isomorphic.

@Bubbler I updated the question to hopefully remove the parsing issue.

what can parsing include from the following: removing redundant information (Type, Size, Alphabet); switching to 0-indexing; swapping the initial state with state 0; turning the list of accepting states to a boolean vector; adding an extra fake state for "no transition" transitions?

@ngn You can remove what you like, reorder it and change the type of brackets. You can't swap the initial state or turn the accepting states into a boolean vector or add an extra fake state.  I wouldn't mind 0-indexing except the 0 transition has a special meaning.

tests as json: https://pastebin.com/raw/082Tgrww

While GAP allows holes in lists and therefore in matrices, they hit the reader of this challenge rather unprepared. When your test input only has zeros, it's enough to explain what they mean. Also, AreEquivAut is a library function, not a builtin.

@ChristianSievers I don't think I have any test examples with holes. If I do that is my mistake.

@Anush Your description of the input format mentions holes.

can we assume that the alphabets of the two dfa-s are of the same size?

Applied fixes. @ngn no you can’t assume that.

@Anush then it would be nice to add at least one test with different alphabet sizes

@ngn I changed my mind. You can assume the alphabets are of the same size. It's not an interesting detail of the challenge.

K (ngn/k), 101 bytes
{a:&,/~=\:/+/'x[2]=\:'!'#'*'*x:+@[;0;0,']'x;n:#**|*x;~#a^a^{?y@<y:y,/x@\:y}[,/'+\:'/(n;1)**x]/,n/x 1}

Try it online!
the argument x is a pair of dfa-s.
a dfa is (TransitionTable;InitialState;FinalStates).
we prepend 0 to all rows in both transition tables. this way we can use 0-indexing, and state0 can act as a tarpit state to handle "no transition" transitions.
consider a new dfa whose states are the cartesian product of those of dfa0 and dfa1.
when state i from dfa0 is paired with state j from dfa1, the resulting state is labelled (i*n)+j where n is the number of states in dfa1.
a is the list of states in the new dfa for which one of the original states was final and the other was not.
we combine the initial states of dfa0 and dfa1 using the formula (i*n)+j.
starting there, we compute the set of states in the new automaton that are reachable through its transitions.
we test if that set is disjoint from a and return a boolean result.

Ah ok. On my phone I just see `ok 8 times in the output section of TIO.  Which part is too hard in that case?

@Anush `ok in my output means that the actual result matches the expected result

ok....:). What did your mean by "too hard"?

@Anush it was a mistake of mine. i thought you were talking about different alphabet sizes.

Prolog (SWI), 431 program + 5 interpreter = 436 bytes
m-->member.
g(A):-read_string(user_input,"\n",[],_,S),term_string(A,S).
f(I,T,S,R):-select(S,T,R),m(I,S),!;S=[I],R=T.
x(S,R)-->[N],{nth1(S,R,N);S=0,N=0}.
x(A,B,C,D)-->x(A,C),x(B,D).
c(_,_,[]).
c(M,E,[A,B|R]):-M=[S,T,C,D],(m(A,C)->m(B,D);\+m(B,D)),f(A,E,X,F),plus(B,N,0),(m(N,X)->c(M,E,R);f(N,F,Y,G),union(X,Y,Z),(P=..[x,A,B]),foldl(P,S,T,Q,R),c(M,[Z|G],Q)).
r:-g(a(A,[B],C)),g(a(D,[E],F)),(c([A,D,C,F],[],[B,E])->R=y;R=n),print(R).

Try it online!
Pass arguments -t r to the interpreter to make r the top-level goal.
Expects the DFAs on standard input, one per line, but with the initial 'Automaton("det", Size, Alphabet' shortened to just 'a('. Outputs a single character to standard output: y if the DFAs are equivalent, or n if they are not.
A more legible version, with comments:
/* Parse a line from stdin as the term A.
   For this program, the term is expected to be a
   Deterministic Finite Automaton in the form
     a(TransitionTable, [Initial], Accepting). */
get(A) :- read_string(user_input, "\n", [], _, S), term_string(A,S).

/* Find the Set in SetOfSets which contains I, and remove it from the
   larger SetOfSets.
   Or if no such Set exists, use the one-element Set [I] instead, and
   leave SetOfSets unchanged. */
find(I, SetOfSets, Set, Rest) :-
  select(Set, SetOfSets, Rest), member(I, Set), !.
find(I, SetOfSets, [I], SetOfSets).

/* Look up the next state from a row of a transition table, or
   two next states from corresponding rows.
   A zero is the failure state and always stays at zero without lookup. */
next_state(0,_) --> [0].
next_state(State,Row) --> [Next], {nth1(State,Row,Next)}.
next_state(State1,State2,Row1,Row2) -->
    next_state(State1,Row1), next_state(State2,Row2).

/* Check if two DFAs are equivalent!

   Equiv is a set of sets of positive state indices from DFA1, negative
   state indices from DFA2, and 0 for a common failure state. After the
   algorithm has examined a pair of states, it makes sure one element
   in Equiv contains both those states for future iterations. All such
   states in one set are tentatively presumed to be equivalent.

   Require is an even-length list. Every pair of elements is a state from
   DFA1 followed by a state from DFA2, and it must be shown that the pair
   of states is equivalent:
     1. If one state is an accept state and the other is not, the DFAs
        are NOT equivalent.
     2. Otherwise, if both states are in the same member of Equiv, no
        further processing is needed for the current pair, since those
        states or related states were already seen.
     3. Otherwise, for each letter in the common alphabet, for equivalent
        DFAs it is necessary that the next states for the two DFAs are
        equivalent.
        3a. Add these pairs of next states to Require for the next iteration.
        3b. Merge sets containing the current states into a common set
            within Equiv for the next iteration.
     4. Repeat until an Accept mismatch is found or until Require is empty.
        If Require is empty, the DFAs are equivalent.
*/
check(_,_,[]).
check(Params,Equiv,[State1,State2|Require]) :-
  /* format("Equiv: ~p~nRequire: ~p~n", [Equiv, [State1,State2|Require]]), */
  Params = [Trans1, Trans2, Accept1, Accept2],
  (member(State1,Accept1) -> member(State2,Accept2) ; \+member(State2,Accept2)),
  find(State1, Equiv, Set1, Equiv2), plus(State2, NegState2, 0),
  (member(NegState2,Set1) -> check(Params, Equiv, Require);
   find(NegState2, Equiv2, Set2, Equiv3), union(Set1, Set2, SetU),
   (P =.. [next_state, State1, State2]),
    foldl(P, Trans1, Trans2, RequireMore, Require),
   check(Params, [SetU|Equiv3], RequireMore)).

/* Top-level goal. Parse two DFAs from standard input, and check
   for equivalence. */
run :- get(a(Transitions1, [Init1], Accept1)), get(a(Transitions2, [Init2], Accept2)),
  (check([Transitions1, Transitions2, Accept1, Accept2], [], [Init1, Init2])
   -> R=y; R=n), print(R).

Try it online!

Very nice to see a Prolog solution.

Though it's yet another case of "seems like Prolog's built-in backtracking support might be useful" then "okay, didn't actually rely much on backtracking after all".


text:
Penney-Conway odds
Background
Penney's game is a two-player game about coin tossing. Player A announces a sequence of heads and tails of length \$n\$, then player B selects a different sequence of same length. The winner is the one whose sequence appears first as a substring (consecutive subsequence) in repeated coin toss.
Conway's algorithm describes how to calculate the odds of a single sequence of length \$n\$ in Penney's game:

For every integer \$1\le i \le n\$, add \$2^i\$ if its first \$i\$ items match the last \$i\$ items. The sum is the expected amount of tosses before you will see the exact pattern. For example (all examples being \$n=6\$),

HHHHTT: Only matches at \$i=6\$, so the expected number of tosses is \$64\$.
TTHHTT: Matches at \$i=1,2,6\$, so the expected number of tosses is \$2+4+64=70\$.
HHHHHH: Matches everywhere, so \$2+4+8+16+32+64=126\$.

This generalizes easily to \$p\$-sided dice: for each match, add \$p^i\$ instead.

Task
Suppose we play Penney's game with \$p\$-sided dice, where \$p\ge 2\$. Given the value of \$p\$ and a sequence of outcomes \$S\$ as input, calculate the expected tosses before you get the exact pattern \$S\$.
The elements of \$S\$ can be \$1 \dots p\$ or \$0 \dots p-1\$.
Standard code-golf rules apply. The shortest code in bytes wins.
Test cases
p  S                            ans
------------------------------------------
2  [0, 0, 0, 0, 1, 1]           64
2  [1, 1, 0, 0, 1, 1]           70
3  [1, 1, 1, 1, 1]              363
9  [0, 1, 2, 3, 4, 5, 6, 7, 8]  387420489

Does the pattern of the last i elements need to be in the same order as the first i elements? (eg. what would the output be for 3 [0, 1, 2, 1, 0] ?)

@mathjunkie Yes. In your case, only i=1 and i=5 match. You can see it in the second test case, where [1, 1, 0] != [0, 1, 1] so 3 is not counted.

05AB1E, 16 9 bytes
Port of @Dingus's Ruby answer, so make sure to upvote him!
-7 bytes thanks to Grimmy.
η¹.sÃ€gmO

Try it online!
Explanation
η          Find all prefixes of the input
 ¹         Re-take the first input
  .s       Find all suffixes of the input
    Ã      Find the two lists' intersection
     €g    Find the length of each
       m   Exponentiation by the second input
        O  Sum the output list

η¹.sÃ€gmO for 9 bytes (or η¹.sÃöPO for 8, but it fails for p >= 10).

Python 3.8 (pre-release), 57 bytes
Modification of @math junkie's code making use of the walrus operator.
lambda p,S,i=0:sum(p**(i:=i+1)*(S[:i]==S[-i:])for _ in S)

Try it online!

An alternative 51-byte solution assuming that we may take an extra argument \$ l \$ denoting the length of the list.
Python 2, 51 bytes
f=lambda p,S,l:l and(S[:l]==S[-l:])*p**l+f(p,S,l-1)

Try it online!

Alternative non-recursive 60-bytes: Try it online!

Python 3.8 is released now :)

J, 18 15 bytes
#.0,~<\.=[:|.<\

Try it online!

Create the boxed suffixes <\. and reversed prefixes [:|.<\...
and check where they match elementwise =...
This will be a boolean mask representing the number we seek in base p, but shifted right one.
0,~ shifts it back how we want...
#. converts it using base p

17 bytes.

@Bubbler Thanks (nice p. use) but I actually realized my original solution could be 3 bytes shorter by just using = instead of -:&>, because = on boxes automatically checks their contents.

Python 2, 55 bytes
f=lambda p,l,i=0:l==l[:i]or(l[:i]==l[-i:])+p*f(p,l,i+1)

Try it online!

Husk, 12 10 9 bytes
ΣMo^L§nṫḣ

Port of @petStorm's 05AB1E answer, so make sure to upvote him!
-2 bytes thanks to @Zgarb.
-1 byte thanks to @Leo.
Try it online.
Explanation:
     §     # Using the first argument-list twice:
        ḣ  #  Take its prefixes
       ṫ   #  And its suffices
      n    #  List intersection; keep only the sublists which are present in both
 M         # Map over each remaining sublist as left argument,
  o        # using the following two commands:
    L      #  Take the length of the sublist
   ^       #  take the power of the two: input^length
Σ          # And then sum the integers in the mapped list
           # (after which the result is output implicitly)

The Husk answer is a port of my answer, mine is a port of the Ruby answer, the Ruby answer is a port of the Python answer...

-2 bytes by getting rid of superscripts and parentheses.

@Zgarb Thanks! Only my third Husk answer, so I still have to get used to it a bit.. Didn't even knew about § nor o.

-1 byte by using M to get rid of the last superscript and swapping arguments. Unfortunately needs an explicit sum

@Leo Thanks! I tried M earlier, but didn't knew it needed the o Zgarb  suggested in order to work here.

Ruby, 55 53 49 bytes
->p,s{(1..s.size).sum{|i|s[0,i]==s[-i,i]?p**i:0}}

Try it online!
Similar to the non-recursive Python answer.

APL (Dyalog Extended), 20 bytes
{⍺+.*≢¨(⌽¨,\⌽⍵)∩,\⍵}

{⍺+.*≢¨(⌽¨,\⌽⍵)∩,\⍵}
,\⍵         prefixes
∩           intersect
(⌽¨,\⌽⍵)   suffixes
≢¨          length of each
⍺+.*        exponentiation and sum

Try it online!

Red, 87 bytes
func[p s][o: 0
repeat n d: length? s[if(at s d + 1 - n)=
copy/part s n[o: p ** n + o]]]

Try it online!

K (oK), 31 bytes
{x/|0,{(y#x)~|y#|x}/:[y;1+!#y]}

Try it online!

Jelly, 9 bytes
eÐƤ¹Ƥ$;0ḅ

A dyadic Link accepting a list on the left and an integer on the right which yields an integer.
Try it online!
How?
eÐƤ¹Ƥ$;0ḅ - Link: list, S; integer, p           e.g.  [2,3,1,2,3]; 4
     $    - last two links as a monad:
    Ƥ     -   for prefixes (of S):                    [2] [2,3] [2,3,1] [2,3,1,2] [2,3,1,2,3]
   ¹      -     identity                              [2] [2,3] [2,3,1] [2,3,1,2] [2,3,1,2,3]
          -   }                                      =[[2],[2,3],[2,3,1],[2,3,1,2],[2,3,1,2,3]]
 ÐƤ       -   for post-fixes (of S):                  [2,3,1,2,3] [3,1,2,3] [1,2,3] [2,3] [3]
e         -     exists in (the collected prefixes)?   1           0         0       1     0
          -   }                                      =[1,   0,   0,   1,   0]
       0  - literal zero                              0
      ;   - concatenate                               [1,   0,   0,   1,   0,   0]
        ḅ - convert from base (p)                      1×4⁵+0×4⁴+0×4³+1×4²+0×4¹+0×4°
                                                      =1024+16
                                                      =1040

Retina, 55 bytes
~[".+¶$.("|'_Lv$`((,\d+)+)$(?<=^(\d+)\1\b.*)
$#2*$($3$*

Try it online! Link includes test suite. Takes input as a comma-separated list, but the test suite removes spaces and brackets for ease of use. Explanation:
Lv$`((,\d+)+)$(?<=^(\d+)\1\b.*)

Match all (necessarily overlapping) suffixes of the input starting with a comma that also match immediately after the base.
$#2*$($3$*

For each match, output a string of the form 2*2* where 2 is the input base and the number of 2s is the number of matched integers. (The trailing ) is implied.)
[".+¶$.("|'_

Join the matches with a _ and prefix the whole output with the following:
.+
$.(

For the second example, this results in the following:
.+
$.(2*2*2*2*2*2*_2*2*_2*

Note that the _) at the end of the program is implied.
~

Evaluate the generated Retina program, thus computing the desired result.

Charcoal, 17 bytes
Ｉ×θ↨θＥη⁼…η⁻Ｌηκ✂ηκ

Try it online! Link is to verbose version of code. Explanation:
     Ｅη              Map over elements of `S`
              ✂ηκ   `S` sliced starting at that element
       ⁼            Is equal to
        …η⁻Ｌηκ      Prefix of `S` with that length
   ↨θ               Convert from base `p`
 ×θ                 Multiply by `p`
Ｉ                   Cast to string for implicit print

Pure Bash, 70 bytes
for((i=$#;--i;)){ [ "${*:2:$i}" = "${*: -$i}" ]&&$[s+=$1**i];};echo $s

Try it online!
The input is passed in the arguments: first p, then the items (each as a separate argument).
Output is on stdout.

Pyth, 16 bytes
sm*q<Qd>dQ^vzdSl

Try it online!
Map (m) over the 1-indexed range of the sequence (Sl(Q)). If the first d elements of the sequence (<Qd) equals the last d elements (>dQ), map to "p to the power of d" (^vzd). Sum the result (s).

Another 16-byter: Try it online!. There's probably a way to golf this

Brachylog, 16 bytes
{{a₀.&a₁}ᵗlᵗ^}ᶠ+

Try it online!
               +    The output is the sum of
{            }ᶠ     every possible output from:
  a₀.               find a prefix
     &a₁            which is also a suffix
 {      }ᵗ          of the last item of the input,
          lᵗ        take its length,
            ^       and take the first element to the power of that length.

source: Stack Exchange

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

sort: votes


text:
Generate list of numbers and their negative counterparts
A recent SO question asks for a convenient one-liner to generate a list of numbers and their negative counterparts in Python.
Given two integers \$1≤a≤b\$, generate all the integers \$x\$ such that \$a≤|x|≤b\$. The result may be printed or returned in any order or structure, as putting the result into a list and sorting it, yields [-b,1-b,2-b,…,-a,a,a+1,a+2,…,b]
Examples
\$a=6,b=9\$ gives [6,-6,7,-7,8,-8,9,-9] or [6,7,8,9,-9,-8,-7,-6] or [-8,7,-9,-7,9,8,-6,6] or [[6,-6],[7,-7],[8,-8],[9,-9]] or [[6,7,8,9],[-6,-7,-8,-9]] etc.
\$a=6,b=6\$ gives [6,-6] or [-6,6] or [[6,-6]] or [[6],[-6]] etc.

Semi-related

Since you seemed to accept concatenated negative numbers in a comment to a certain answer, do you accept 1-1 2-2 3-3 4-4?

@mypronounismonicareinstate It wasn't just concatenated negative numbers. They were generated as proper numbers, and just printed individually with no separator. That's fine. However, I would object to using string operations to interleave spaces and dashes with duplicated digits, as the individual numbers are never generated then.

What about languages that does not support negative numbers?

@HighlyRadioactive Decide on a bit-width (minimally 8 bits) and use the corresponding unsigned integer. E.g. -6 is 250.

@HighlyRadioactive By the looks of that Hello world example it can print, so you could print the - characters manually?

@KevinCruijssen It's not allowed. "However, I would object to using string operations to interleave spaces and dashes with duplicated digits, as the individual numbers are never generated then." -- Adám

Python 2, 33 bytes
def f(a,b):print-a,a;a<b<f(a+1,b)

Try it online!
A recursive function that prints in a two-column format. Based on ideas from Surculose Sputum.
In Python 3, we'd need 2 more bytes for print() needing parens.

Python 2, 37 bytes
lambda a,b:range(a,b+1)+range(-b,1-a)

Try it online!
Unfortunately for this challenge, Python's ranges are exclusive, so we have to add 1 to both upper endpoints.

Haskell, 21 bytes
a%b=[a..b]++[-b.. -a]

Try it online!
Looks like this boring solution is shortest. The space in before -a is needed to avoid a misparse with ..-.
22 bytes
a%b=[id,(0-)]<*>[a..b]

Try it online!
22 bytes
a%b=[[x,-x]|x<-[a..b]]

Try it online!
23 bytes
a%b=do x<-[a..b];[x,-x]

Try it online!
23 bytes
a%b=(,)<*>(0-)<$>[a..b]

Try it online!

05AB1E, 4 bytes
ŸD(«

Try it online!
Explanation
     Takes two input integers
Ÿ    Inclusive range.
 D   Duplicate the stack.
  (  Negate all items of the duplicated item.
   « Concatenate both lists.
     Implicit output

Pyth, 5 bytes
_BM}F

Try it online!
}F forms an inclusive range, then _B pairs a number with its negation, and M maps that over the list.

_MB}F also works.

PowerShell, 28 bytes
$args[0]..$args[1]|%{$_,-$_}

Try it online!
$args[0]..$args[1] generates integer array range from $args[0] to $args[1]. It's piped and then each item in that array is mapped to itself and its negative counterpart.

Welcome to PPCG and great first answer, Eligrhath! Just received your first upvote from me :)

Python 3, 40 39 bytes
-1 byte thanks to @xnor!

f=lambda a,b:b//a*[0]and[a,-a]+f(a+1,b)

Try it online!
This would be 38 bytes in Python2, by replacing // operator with just /.

Huh, your solution is more competitive that I'd expected for anything recursive here. You can save a byte on the base case, two in Python 2: Try it online!

@xnor Ah yes the list multiplication trick. Gotta keep that in mind, thanks!

Dyalog APL, 19 bytes
{(⊢,-)⍺,⍺(⊣+∘⍳-⍨)⍵}

Try it online!

Do you know TIO can auto-generate posts like this one? [Esc],[s],[g].

Welcome to PPCG and great first answer. Who'd have known you're already a very active member of APL Orchard before your first submission! Hope to continue to see you in the room :)

By the by, this format is also often used in APL TIO links, let me know what you think... I find it convenient for demonstrating all the input cases, when there are several: Click me Even in the case of one input, it can be rather attractive: Peekaboo

Thank you all for your helpful encouragement.

Jelly, 3 bytes
rNƬ

A dyadic Link accepting two integers (either way around) which yields a list of two lists.
Try it online!
How?
rNƬ - Link: integer, a; integer b                         e.g. 7; 4
r   - inclusive range  [a..b]                                  [7,6,5,4]
  Ƭ - collect up while unique, applying:
 N  -   negate (vectorises)                    0-applications: [[7,6,5,4]]
                                               1-application:  [[7,6,5,4],[-7,-6,-5,-4]]
                                               2-applications: [[7,6,5,4],[-7,-6,-5,-4],[7,6,5,4]]
                                                               - no longer distinct
                                                            -> [[7,6,5,4],[-7,-6,-5,-4]]

There are many, many ways to achieve this task in four bytes in Jelly.

Java 10, 76 56 52 50 bytes
b->a->{for(;a<=b;)System.out.println(a+","+-a++);}

-22 bytes thanks to @OlivierGrégoire.
Takes the inputs in reverse order. Prints pairs of positive and negative integers "a,-a" newline separated.
Try it online.
Explanation:
b->a->{                  // Method with two integer parameters and no return-type
  for(;a<=b;)            //  Loop in the range [a,b]:
    System.out.println(  //   Print with trailing newline:
      a                  //    `a`
      +" "               //    appended with a space
      +-a                //    appended with `-a`
         ++);}           //   And then increase `a` by 1 with `a++`

Don't know if fully valid, but 72 bytes

Or 56 bytes.

@OlivierGrégoire Ah nice, I hadn't thought about just printing directly.. And an additional -1 by removing that space at +++ and -3 by printing directly. I like that Map approach as well btw, very original. :D

If you take the print route, take it entirely! ;-) I used \n for consistency because of a comment to the question. But one more byte can be gained if you keep the space.

@OlivierGrégoire Ah nice. :) And space or comma should be fine. OP even allows this kind of output.

C (gcc), 44 43 42 bytes
Saved a byte thanks to ceilingcat!!!
Saved a byte thanks to S.S. Anne!!!
f(a,b){for(;b/a;)printf("-%d %1$d ",a++);}

Try it online!

Ruby, 22 bytes
->a,b{[*-b..-a,*a..b]}

Try it online!

R, 26 25 bytes
-1 bytes thanks to Giuseppe
function(a,b)c(a:b,-b:-a))

Try it online!

Keg, -pn , 5 bytes
ɧ⑷④±.

It prints all the numbers separated by newlines.
Explained
ɧ⑷④±.
ɧ      # Generate a range between the two implicit inputs
 ⑷④±. # For each number in that range, print it raw without popping, negate it, and print it raw

Try it online!

The challenge says you may print it in any structure, so this is probably okay.

@petStorm It is.

JavaScript (Node.js), 33 31 bytes
-2 bytes thanks to @mypronounismonicareinstate.
b=>f=a=>a>b?[]:[a,-a,...f(a+1)]

Try it online!

As far as I see, the outermost parentheses aren't necessary (or are they for some reason?)

@mypronounismonicareinstate thanks for noticing, coming from Python, I just assumed they needed to be there.

Is the ... necessary?

C# (Visual C# Interactive Compiler), 47 46 bytes
Much shorter than the beautiful LINQ solutions with SelectMany :(
I also cannot remember when I last wrote a for loop while code-golfing, so I likely missed trivial golfs.
a=>b=>{for(int i=a;i<=b;Print(-i++))Print(i);}

Try it online!

You can get rid of i in the for loop. You can also combine the prints. Should be valid according to the challenge.

Google Sheets, 66 bytes
=ArrayFormula({Row(Indirect(A1&":"&A2));-Row(Indirect(A1&":"&A2))}

Sheets will automatically add the last closing parentheses when you exit the cell. (A 1.5% byte reduction!)
Input is in cells A1 and A2. The order doesn't actually matter.
Indirect(A1&":"&A2) creates a range that contains all the rows between those numbers, inclusive.
Row(Indirect(~)) returns the row numbers of everything in that range.
{Row(~);-Row(~)} creates an array of the positive and negative row numbers.
ArrayFormula(~) makes all the other bits operate on and return arrays. Without this, it would only return the first value in the array (the first row number) instead of all of them.

PHP, 51 46 40 bytes
fn($a,$b)=>[range($a,$b),range(-$b,-$a)]

Try it online!
simply using php7 lambda functions short notation and built-in array functions..
EDIT: hum I see that from PHP7.4 we have now a spread operator! -5 bytes
EDIT2: thanks to DomHastings for saving another 6 bytes!

Based on the accepted examples, I think you can drop the spreads entirely for -6!

@DomHastings Oh, yep! Hadn't even looked at the examples :D I was glad to use this new stuff though

Bash + Core utilties, 21 bytes
seq $1 $2;seq -$2 -$1

Try it online!

LaTeX, 61 56 bytes
\input tikz.tex\def\f#1#2{\foreach~in{#1,...,#2}{~;-~;}}

Defines a macro f that takes input as two arguments and outputs the numbers as tokens to latex (so they are printed in the pdf), semicolon-seperated.
Explanation
\input tikz.tex                % load the tikz package for the foreach command
\def\f#1#2{                    % define a macro f that takes two arguments
   \foreach ~                  % loop with the loop variable called ~
                               % (to save a space between the name and "in")
   in {#1,...,#2} {            % where ~ ranges from the first to the second
                               % argument, inclusive
        ~;-~;                  % the macro f expands to
                               % ~
                               % a semicolon and a minus sign
                               % ~
                               % another semicolon
   }
}

Example
\documentclass{article}
\input tikz.tex
\def\f#1#2{\foreach~in{#1,...,#2}{~;-~;}}
\begin{document}
\f6 9

\f6 6
\end{document}

Output:

56 bytes by using \input tikz.tex and looping over ~ instead of \,: \input tikz.tex\def\f#1#2{\foreach~in{#1,...,#2}{~ -~ }}

Kotlin , 22 bytes
{a,b->(a..b)+(-b..-a)}

Vyxal W, 3 bytes
ṡ:N

Try it Online!
ṡ:N
ṡ       Inclusive range of inputs
 :      Duplicate
  N     Negate the duplicate

W flag: Wrap both ranges into one list, which is implicitly output

Erlang (escript), 36 bytes
g(A,B)->[[X,-X]||X<-lists:seq(A,B)].

Try it online!
Erlang (escript), 40 bytes
Port of Surculose Sputum's answer.
g(A,A)->[A,-A];g(A,B)->[A,-A]++g(A+1,B).

Try it online!

Befunge-98 (FBBI), 24 bytes
&00p&v
0g-k@>::.'-,.1+:0

Try it online!
Explanation
&00p& is the input part. &00p takes \$b\$ as input and stores it in the top left corner. & takes input \$a\$ and pushes it to the stack.
0g-k@>::.'-,.1+:0 is the main loop and, as the instruction pointer wraps around, equivalent to:
::.'-,.1+:00g-k@

::                duplicate a twice
  .               print a
   '-,            print '-'
      .           print a
       1+         increase a
         :        duplicate the new value of a
          00g     get b from the top-left corner
             -    calculate a-b, as Befunge has no negative values,
                  this is 0 for b>=a
              k@  execute *quit* (b-a)-times

Perl 6, 17 bytes
{$^a..$^b X*-1,1}

Try it online!
Just performs a multiplication (*) with every combination (X) of the range given ($^a..$^b) by -1 and 1

J, 10 bytes
]-.&i:<:@[

Try it online!

Husk, 5 bytes
mSe_…

Try it online.
Or alternatively:
Svm_…

Try it online.
Explanation:
    …  # Create a an inclusive range using the two (implicit) input-arguments
m      # Map over this list
 Se    # and pair each element with:
   _   #  Its negative
       # (after which the result is output implicitly)

    …  # Create a an inclusive range using the two (implicit) input-arguments
 v     # Concatenate it with:
S m    #  The same list with each value mapped to:
   _   #   Its negative
       # (after which the result is output implicitly)

Burlesque, 11 bytes
ps^pr@Jng.+

Try it online!
I feel like there's probably a better way to parse the input, but I'm not getting it. Explanation:
ps^p          # Parse input as block and split block to stack
    r@        # Generate range between two inputs
      Jng     # Duplicate and negate
         .+   # Concatenate and implicitly output

K (oK), 15 bytes
{1 -1*/:y,y^!x}

Try it online!

Why does {1 -1*,y,y^!x} not work?

@Adám K needs instructions (eahright) how to multiply, since the length of both args do not match. Multiplication (as many of the verbs) is right-atomic - it penetrates in depth to the levels of the nesting of the right argument.

I'm not sure I understand what "right-atomic" means. I just thought that for a scalar function, if one side had one element and the other many, it'd extend the single argument.

@Adám Hmm, as it seems * is fully atomic. In our case I'm multiplying a list of length 2 (1 -1) by a list of length 4 (9 6 7 8). I'm not sure why does ' (each) not work here.

Each-ing with lists of two different lengths is always a length error.

@Adám Yes, it tries to pair-up the items.

Let us continue this discussion in chat.

brainfuck, 36 bytes
,[->+>->-<<<],+[->>+<<]>>[-<.+>>.-<]

Try it online!
Clarification
Input and output are treated as bytes (as permitted in Can numeric input/output be in the form of byte values?)
Since negative bytes don't really make sense, a negative answer wraps around and starts at the largest value of the cell. For example, given a cell size of 128, the output for the input in bytes [6, 9] will be (in bytes) [6,(128-6),7,(128-7),8,(128-8),9,(128-9)]
Hopefully that's a fair enough interpretation of the rules!

i.e. your bytes should be interpreted as 2's complement representations of signed integers.  If BF can only actually do I/O in unsigned decimal, that seems fine to me.  In assembly language there are no types, it's all just bytes, so it's up to the programmer to to write code that uses signed operations / comparisons on those bytes as opposed to float or unsigned compares.  (Many operations other than compare are the same for signed 2's complement vs. unsigned binary integers; division, right shift, and widening mul being different.)

Perl 5, 20 bytes
say"$_
-$_"for<>..<>

Try it online!

Zsh, 17 bytes
echo {,-}{$1..$2}

Try it online!

Bash, 22 bytes
1 byte more than Bash+seq, 5 bytes more than Zsh due to eval
eval echo {,-}{$1..$2}

Try it online!

Piet, 90 codels
Did someone say "one-liner"?

Okay, so technically it's three lines, but I couldn't figure out how to exit a Piet program in less than three pixels of width (or how to loop in less than two pixels). Here it is with a codel size of 4:

And here's the npiet trace of it processing \$a=6, b=9\$:

For input, it takes \$b\$ then \$a\$. For output, it calculates each value of \$x\$ and \$-x\$, outputting them without separators (as was allowed in a comment, as long as the individual numbers are actually calculated).

Pip -s, 6 bytes
-Pa\,b

Outputs the positive numbers on one line and the negative numbers on the next. Try it online!
Explanation
        a and b are command-line args (implicit)
  a\,b  Inclusive range from a to b
 P      (printed)
-       Negate each value in the range
        Autoprint (implicit)

The -s flag puts a space between consecutive numbers in a list. Other options include -n (newline) and -p (output like [6;7;8;9]).

Factor, 22 bytes
[ [a,b] dup vneg zip ]

Try it online!

[a,b] Make a range from the inputs (for example, 3 6), inclusive.
Stack: T{ range f 3 4 1 } (A virtual sequence that starts at 3, has 4 elements, and has an increment of 1.)

dup Duplicate.
Stack: T{ range f 3 4 1 } T{ range f 3 4 1 }

vneg Flip the sign of every element in a sequence.
Stack: T{ range f 3 4 1 } { -3 -4 -5 -6 }

zip Combine two sequences into an associative mapping.
Stack: { { 3 -3 } { 4 -4 } { 5 -5 } { 6 -6 } }

Python 3, 63 bytes
lambda n,l=[]:([l.extend([i,-i])for i in range(1,n+1)]+[l])[-1]

Try it online!

Thunno, \$ 7 \log_{256}(96) \approx \$ 5.76 bytes
1+:DnA+

Attempt This Online! Takes input as \$b\$ then \$a\$.
Explanation:
1+:DnA+  # Implicit input
1+       # Add one to b (because of how Thunno's range works)
  :      # range from a to b+1
   Dn    # Duplicate and negate the top copy
     A+  # Concatenate the two lists

Go, 60 bytes
func(a,b int)(o[]int){for;a<=b;a++{o=append(o,a,-a)};return}

Attempt This Online!

Pyt, 4 bytes
ŘĐ~Ž

Try it online!
Ř         2 implicit inputs (larger, then smaller); get Řange between the two
 Đ        Đuplicate
  ~       Negate
   Ž      Žip the two lists together; implicit print

Julia 1.0, 15 bytes
a^b=[-b:-a;a:b]

Try it online!

Thunno 2 O, 3 bytes
IßṄ

Attempt This Online!
Explanation
IßṄ  # Implicit input
I    # Inclusive range
 ß   # Print without popping
  Ṅ  # Negate each
     # Implicit output

Charcoal, 10 bytes
Ｆ…·ＮＮＩ⟦ι±ι

Try it online! Link is to verbose version of code. Explanation:
Ｆ…·ＮＮ

Loop over the inclusive range between the two inputs.
Ｉ⟦ι±ι

Output each number and its negation as a string.

W, 4 bytes
Port of my 05AB1E answer.
G,▌▲

Uncompressed:
.:_r+

Explanation
.     % Inclusive range
 :    % Duplicate the operand
  _r  % Map by negation
    + % Concatenate

The github link in title is broken though.

@mypronounismonicareinstate Can you see this repository?

Yes.

Why'd you delete your other GitHub account? Is there something wrong with a'_' or a-ee? I would think that there's a lot of broken links out there.

@S.S.Anne My GH account got flagged, and it may seem like it is deleted. Don't worry, the repositories are all there.

You should report it and have it fixed. Why would it have been flagged?

Icon, 47 bytes
procedure f(a,b)
write(c:=a to b," ",-c)&\z
end

Try it online!

Wolfram Language (Mathematica), 16 bytes
{a=Range@##,-a}&

Try it online!

Factor, 49 bytes
: f ( a b -- r r ) [a,b] >array dup [ neg ] map ;

Try it online!

MathGolf, 9 bytes
Why doesn't MathGolf have a ranged list (nor negate) builtin?.. :/
kk↨ÞmÉ_~)

Try it online.
Or alternatively:
╒_b*^k({╞

Takes the inputs in reverse order.
Try it online.
Explanation:
kk         # Push both input-integers explicitly (since there seems to be a bug with `↨`..)
  ↨        # Loop the first integer amount of times,
           # and create a list in the range of the two integers every iteration :S
           # (i.e. 6 9 will loop 6 times, creating a list [6,7,8,9] every iteration)
   Þ       #  In every iteration: leave just the top item of the stack
    m      #  And map it to,
     É     #  using the following 3 commands:
      _    #   Duplicate the current integer
       ~   #   Take the bitwise-NOT: -a-1
        )  #   And increase it by 1 to make it -a
           # (after which the entire stack joined together is output implicitly as result)

╒          # Push a list in the range [1, (implicit) input-integer]
 _         # Duplicate it
  b*       # Multiply each inner value by -1
    ^      # Zip the two lists together, creating pairs
     k(    # Push the second input-integer, and decrease it by 1
       {   # Loop that many times:
        ╞  #  And discard the first item of the list every iteration
           # (after which the entire stack joined together is output implicitly as result)

cQuents, 18 bytes
=A#|2B-2A+2&-Z,Y+1

Try it online!
Explanation
                     A = first input
                     B = second input
=A                   first term in sequence = A
  #|2B-2A+2          n = 2(B - A + 1)
           &         output first n terms in sequence
            -Z,      alternate the negative of the previous term
               Y+1     and two terms ago + 1

dc, 25 bytes
?[d0r-np1-rd3Rd3R!>L]dsLx

Try it online!

def f(a,b):
print(-a,a)
if(a<b):
    f(a+1,b)

Welcome to Code Golf. What language is this? Look at the other answers to see how to format your post.

x86-64 machine code function, 11 bytes
Callable with int *dst in RDI, int low in ESI, and int high in EAX.
Returns a pointer to one-past-the-end of the sequence in RDI.
     4                         posneg_seq:
     8                         .loop:                ; do{
     9 00000000 AB                 stosd               ; *dst++ = a
    10 00000001 F7D8               neg  eax            ; a = -a
    11 00000003 AB                 stosd               ; *dst++ = a
    12 00000004 F7D0               not  eax            ; a = -a - 1
    13 00000006 39F0               cmp  eax, esi
    14 00000008 7DF6               jge .loop         ; }while(a>=low);
    15
    19 0000000A C3                 ret

(Line numbers are discontiguous because I trimmed lines with %ifdeffed out code to adapt the calling convention to x86-64 System V for testing with a C++ caller: xchg eax, edx at the start, mov  rax, rdi at the end.)
This is interesting in x86 asm because we have an efficient *dst++ = eax that only works for one register.  So not only would it take extra instructions to get -a in another register, it would take more bytes to store it.
The trick is to fold the increment (or decrement) into the negation using the 2's complement identity -x - 1 == ~x to flip back to positive and decrement with a NOT instruction.  NEG/NOT gives us x -= 1 overall, with access to -x along the way.
Try it online! with a C++ test caller (and the asm wrapped in an inline-asm statement at global scope, with extra instructions to adapt the calling convention).
Output is in decreasing magnitude, like  9, -9, 8, -8, 7, -7, 6, -6.

Arturo, 30 25 24 bytes
$[x,y][++x..y(0-x)..0-y]

Try it

Fig, \$6\log_{256}(96)\approx\$ 4.939 bytes
Rx}
wN

Try it online!
Rx} # Line 1
Rx  # Range from a
  } # To b + 1
----------
wN  # Line 2. Takes the result of the above line as input
 N  # Negate the range
w   # Wrap in a list with the original range

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


text:
Where to point a low-orbit ion cannon (asking for a friend)
Challenge
Premise
Bob lost1 Alice's precious grand piano. Big mistake. Alice has now stolen Bob's low-orbit ion cannon.
Alice refuses to just make up with Bob, so let's help her give him a light tap on the roof. Suppose that from the top Bob's house looks like a lattice polygon, where all points have integer coordinates...
1. So he says.
Task
Input: an \$n\times2\$ matrix of integers (where \$3\leq n\leq16\$) representing the coordinates of the points of an \$n\$-gon, given in the order in which you would join them up. To be absolutely clear, the first and second values in each of the \$n\$ rows are respectively an \$x\$- and a \$y\$-coordinate.

If it would be far more natural to take something other than a 2D matrix in your language or it's impossible to take one, you can use something else. Should this happen, please clearly state what you're doing.
\$x\$-coordinates or \$y\$-coordinates may be negative, zero or positive.
The polygon formed by joining up the points in the given order may be convex or concave.
There's no need to consider degenerate polygons.
No input polygon will be self-intersecting, thank goodness.

Output: two numbers of any numeric type, respectively representing the \$x\$-coordinate and \$y\$-coordinate of a point within the polygon.

No, your numbers needn't be integers.
Your output needn't be consistent for any single input. You're allowed to generate an output in any valid way that shortens your code.
Corners and edge points are forbidden. Sorry.

Example 1
Input:
0 0
3 0
3 4

Possible output: 1 1
Example 2
Input:
-3 -1
0 1
-1 -1
-1 0

Possible output: -0.31416 0.42
Remarks

This is code-golf, so fewest bytes wins.
The random tag is here only to be on the safe side. I expect that not every answer will use randomness.
Standard rules, I/O rules and loophole rules apply.
If possible, link an online demo of your code.
Please explain your code.

Got to love that premise :D I half expected us to need to calculate also the strength of the shot based on the cannon's altitude, the current day's weather at Bob's place and the age of the captain :P

Presumably the point must not be on the boundary of the polygon? Otherwise any coordinate within the input matrix is a valid answer! Should hopefully be obvious but probably worth a mention in the rules to be explicit

Brute-forcing is forbidden is a non-observable requirement. Maybe it should be changed to your output must be deterministic? (Although I realize it is a quite different rule.)

@Arnauld Edited in a manner that I hope will minimise loss of fun.

Is the polygon guaranteed not to intersect itself?

I'd suggest adding a test case with a concave polygon where taking the average of the vertices yields a point not in it, since someone is bound to try this.

Is there flexibility in the input? Like taking two lists or vectors of numbers with the x and y coordinates respectively

@xnor dang, you're ruining by big secret plan to rule them all.. gotta think again

Can we use complex numbers as input / output coordinates?

I'm not sure why some of these concerns weren't really visible with 'Positioning a fake mirror for best effect', but edited (2020-04-23T16:14Z)...

@subdermatoglyphic I suspect it's because a 2n matrix is more naturally split into (two) separate inputs than an mn matrix, and because that question didn't care about transposing the matrix.

Gotcha!

"asking for a friend" . . . sure . . . I think the OP is the one who stole the ion cannon. :-)

Python 3.8, 116 110 bytes
lambda p:[x:=min(p)[0]+.1,sum(sorted(b+(d-b)*(x-a)/(c-a)for(a,b),(c,d)in zip(p,p[-1:]+p)if(a<x)^(c<x))[:2])/2]

Try it online!
Input: A list of points, each is a tuple of 2 integers.
Output: A point as a list of 2 numbers.
Approach
Draw a vertical line through the polygon. Select the first 2 points where the line intersects with the polygon edges. Any point between those 2 points must be inside the polygon.

Note that the line should be chosen such that it doesn't intersect any polygon vertex.
Code explanation
The x-coordinate of the line is selected as the minimum x of all vertices, plus a small amount (0.1 is used in this case):
x:=min(p)[0]+.1

This ensures that the line intersects the polygon, and that it doesn't pass through any vertex (since vertices all have integer coordinates).
For each edge through vertices \$(a,b)\$ and \$(c,d)\$, the line intersects the edge if \$a<x<c\$ or \$a>x>c\$. Golfed using xor trick:
if (a<x)^(b<x)

The y-coordinate of each intersection is calculated using the following formula:
$$\frac{y-b}{x-a}=\frac{d-b}{c-a}$$
or b+(d-b)*(x-a)/(c-a)
The y-coordinate of the final point is calculated as the average of the smallest 2 y-coordinates.

Arg! I thought Python 3.8 handles 0 division...

Wolfram Language (Mathematica), 11 bytes
Mathematica has a built-in for pointing ion cannons. In fact, as far as I know, it should support self-intersecting roofs. Takes input as a polygon.
RandomPoint

Try it online!
By the way, RandomPoint@Polygon@#& is 5 bytes of Sledgehammer: ⡘⠼⡃⡖⣳.

Perl 5, 191 bytes
sub{sub c{($_[0]+$_[1])/2}map{$x{$_->[0]}=0}@_;$x=c sort
keys%x;for(0..$#_){($t,$y)=@{$_[$_]};($d=$_[$_-1][0]-$t)&&($t=($x-$t)/$d,$t*(1-$t)>0&&push@y,$y+$t*($_[$_-1][1]-$y))}@{[$x,c
sort@y]}}

It's deterministic and O(n).
Choose an \$x\$-coordinate \$P_x\$ ($x) halfway between the smallest two unique input \$x\$ coordinates. Test each polygon side to see if that line segment intersects the \$x=P_x\$ vertical line. If it does, add the \$y\$-coordinate of that intersection point to @y. Finally, let \$P_y\$ be halfway between the two smallest values in @y, and the output is \$(P_x,P_y)\$: since you cross exactly one edge to get here from the \$y=-\infty\$ end of the \$x=P_x\$ line, the point must be inside the polygon.
Try it online!

MATL, 19 bytes
`xx,Xr]yy&G4$TF#ZQ~

The input is a vector with x coordinates, then a vector with y coordinates. The ouput is x, then y. Running time is random, but finite with probability 1.
Try it online!
How it works
The program randomly generates points with a bidimensional Gaussian distribution until one of them happens to be inside the polygon. This distribution spans the full plane, so the code eventually finds a solution.
`       % Do...while
  xx    %   Delete twice. In the first iterarion this takes the two inputs
        %   (implicitly) and deletes them. In subsequent iterations this
        %   deletes the previous x, y candidate coordinates, which turned out
        %   not to be a solution
  ,     %   Do twice
    Xr  %     Generate a random number with a standard Gaussian distribution.
        %     Note that his covers the whole plane, although points close to
        %     the origin have greater a probability density
  ]     %   End. The stack contains two numbers representing x, y coordinates
        %   of a potential solution
  yy    %   Duplicate top two elements in the stack
  &G    %   Push the two inputs
  4$    %   Specify four inputs for the next function
  TF#   %   Specify the first of two possible outputs for the next function
  ZQ    %   Inpolygon function: takes four inputs, where the first and second
        %   define x, y coordinates of a point, and the third and fourth define
        %   the x, y coordinates of the polygon vertices. The (first) output is
        %   true if the point is strictly in the polygon, and false if not
  ~     %   Negate
        % End (implicit). A new iteration starts if the top of the stack is
        % true, meaning that the tested x, y values were not a solution
        % Display (implicit)

Java 10, 378 bytes
import java.awt.geom.*;X->Y->{var p=new Path2D.Double();p.moveTo(X[0],Y[0]);int l=X.length,f=1,i=1;for(;i<l;)p.lineTo(X[i],Y[i++]);p.closePath();var r=p.getBounds();double x=0,y=0;for(;f>0;)for(x=r.getX()+Math.random()*r.getWidth(),y=r.getY()+Math.random()*r.getHeight(),i=f=0;i<l-1;)f=!p.contains(x,y)|new Line2D.Double(X[i],Y[i++],X[i],Y[i]).contains(x,y)?1:f;return x+","+y;}

Having builtins is usually an advantage, right?.. :/ I'll see if a manual approach is shorter later on.
Input-coordinates as two loose arrays for x and y respectively, output as a comma-delimited String of the random x,y-coordinate.
Try it online.
Explanation:
import java.awt.geom.*;      // Required import for Path2D and Line2D
X->Y->{                      // Method with two int-arrays as parameters and String return-type
  var p=new Path2D.Double(); //  Create a Path2D
  p.moveTo(X[0],Y[0]);       //  Start at the first input-coordinate
  int l=X.length,            //  Store the amount of points in `l`
      f=1,                   //  Flag integer, starting at 1
  i=1;for(;i<l;)             //  Loop `i` in the range [1, l):
    p.lineTo(X[i],Y[i++]);   //   And draw a line to the `i`'th x,y-coordinate of the input
  p.closePath();             //  Close the path, so we now have our polygon
  var r=s.getBounds();       //  Create a Rectangle that encapsulates this polygon
  double x=0,y=0;            //  Create the random x,y-coordinate
  for(;f>0;)                 //  Loop as long as the flag is still 1:
    for(x=r.getX()+Math.random()*r.getWidth(),y=r.getY()+Math.random()*r.getHeight(),
                             //   Get a random x,y-coordinate within the Rectangle
        i=f=0;               //   (Re)set both the flag and `i` to 0
        i<l-1;)              //   Inner loop `i` in the range [0, l-1):
      f=!p.contains(x,y)     //    If the Path2D-polygon does NOT contain this random x,y-coordinate
        |                    //    Or:
         new Line2D.Double(  //    Create a Line2D
          X[i],Y[i++],       //    from the `i`'th x,y-coordinate of the input
          X[i],Y[i])         //    to the `i+1`'th x,y-coordinate of the input
         .contains(x,y)?     //    And if this line does contain the random x,y-coordinate:
          1                  //     Change the flag to 1
        :                    //    Else:
          f;                 //     Keep the flag the same
  return x+","+y;}           //  And finally return our random x,y-coordinate as String

Python 2, 89 bytes
l=input()
(B,b),(A,a),(C,c)=min(zip(l[1:]+l,l,l[2:]+l))
print.2+B,b+(a+c-b*2)/(A+C-B*2)/5

Try it online!
Here's the strategy for picking the point:

Take the vertex \$p\$ with the smallest \$x\$-coordinate. If there's a tie, any is fine.
Consider the two edges leading from \$p\$. To obtain a direction that's in between them, add them as vectors.
Travel from \$p\$ in this direction far enough to go +0.2 units in the \$x\$ direction, and pick the point you arrive at.

Because \$p\$ is among the leftmost points of the polygon, any direction that's in between the two edges leading from it points inside the polygon. Because we only travel 0.2 units in the \$x\$ direction and all vertices lie on integer points, we can't have exited the polygon after going less than 0.5.

This fails for the edge case of the unit triangle - the resulting point lies on the triangle's hypotenuse. I think changing 0.5 to something smaller like 0.2 fixes this problem.

@SurculoseSputum Good catch. I suspect a smallest value does indeed work, but I'll delete this now and think about that later.

@SurculoseSputum I think I've convinced myself that 0.2, or indeed any value less that 0.5 works, by considering shearing the coordinates to make one edge from the point it be horizontal. I don't have a proof though, so let me know if it still doesn't work. Thanks again for catching this.

Erlang (escript), 174 bytes
f(P)->X=hd(lists:min(P))+0.1,[X,lists:sum(lists:sublist(lists:sort([B+(D-B)*(X-A)/(C-A)||{[A,B],[C,D]}<-lists:zip(P,[lists:last(P)|lists:droplast(P)]),(A<X)xor(C<X)]),2))/2].

Try it online!


text:
Perimeter of Conway hexagon
Background
Given a triangle \$ABC\$, extend its three sides by the opposite side length, as shown in the figure below. Then the six points surprisingly lie on a circle called the Conway circle, whose center coincides with the incenter (the center of incircle, the circle that is tangent to the three sides from the inside).

Task
Given three side lengths \$a,b,c\$ of the triangle \$ABC\$, calculate the perimeter of the hexagon \$A_b B_a B_c C_b C_a A_c\$ (formed by the six points on the Conway circle).
The answer must be within 1e-6 relative error from the expected. You can assume the side lengths form a valid non-degenerate triangle.
The shortest code in bytes wins.
Test cases
a   b   c         ans
---------------------
1   1   1    9.000000
2   2   3   20.399495
3   4   5   35.293155
6   7   12  65.799785
2.3 4.5 6.7 31.449770

@FryAmTheEggman OK, though it isn't that relevant to the task (you don't need to compute the inradius or the coordinates of the incenter).

That's fair, but someone might!

Thanks for all the John Conway challenges -- they're a nice homage to him.

Python 3, 89 87 69 68 bytes
Thanks @xnor for finding a shorter expression, saving 1 byte!
f=lambda a,b,c,n=3:n and(a+b+c)*(c*c/a/b-a/b-b/a+2)**.5+f(b,c,a,n-1)

Try it online!
A recursive function, takes in 3 sides of the triangle as input.
Recursion is used to repeats the function 3 times, each time with the positions of a,b,c swapped in order to calculate each of the 3 summands in the formula below.
How
We can see that each side of the hexagon is the base of an isosceles triangle, whose vertex angle is an angle of the original triangle. For example:

\$C_aC_b\$ is the base of \$CC_aC_b\$ - an isosceles triangle with leg \$c\$ and vertex angle \$\widehat{C}\$.
\$A_bB_a\$ is the base of \$CA_bB_a\$ - an isosceles triangle with leg \$a+b\$ and vertex angle \$\widehat{C}\$.

Given the leg \$l\$ and vertex angle \$\theta\$ of an isosleces triangle, the base is calculated as:
$$l\sqrt{2-2\cos{\theta}}$$
Consider 2 opposites side of the hexagon, says \$C_aC_b\$ and \$A_bB_a\$. Since their corresponding triangles have the same vertex angle, their total length is:
$$c\sqrt{2-2\cos{\widehat{C}}}+(a+b)\sqrt{2-2\cos{\widehat{C}}}$$$$=(a+b+c)\sqrt{2-2\cos{\widehat{C}}}$$
Then the perimeter of the hexagon is the sum of 3 opposite pairs:
$$(a+b+c)\left(\sqrt{2-2\cos{\widehat{A}}}+\sqrt{2-2\cos{\widehat{B}}}+\sqrt{2-2\cos{\widehat{C}}}\right)$$
The cosine of an angle can be calculated from the sides of the triangle:
$$2-2\cos{\widehat{C}}=\frac{c^2-(a-b)^2}{ab}$$
Thus, the final formula for the hexagon's perimeter is:
$$(a+b+c)\left(\sqrt{\frac{a^2-(b-c)^2}{bc}}+\sqrt{\frac{b^2-(a-c)^2}{ac}}+\sqrt{\frac{c^2-(a-b)^2}{ab}}\right)$$

Great solution, and shorter than mine! I'll post a bounty when this challenge is old enough to allow it.

It looks like expanding out (c*c-(a-b)**2)/a/b -> c*c/a/b-a/b-b/a+2 works to save a byte.

@xnor Nice golf, thanks! Also I appreciate the bounty!

Python 3, 64 bytes
lambda*t:eval("+((-(%s-%s)**2+%s**2)/%s/%s)**.5"*3%(t*5))*sum(t)

Try it online!
Uses an adaptation of a formula by Surculose Sputum, written so that the variables a,b,c repeat in a cycle when the formula is read left to right.
+((-(a-b)**2+c**2)/a/b)**.5+((-(c-a)**2+b**2)/c/a)**.5+((-(b-c)**2+a**2)/b/c)**.5

This lets us insert the input values into the formula as literals by string interpolation on the tuple (a,b,c) repeated 5 times, and then call eval to evaluate the resulting expression.

Python 3, 76 bytes
lambda a,b,c:sum((2-(a*a+b*b+c*c-2*x*x)*x/a/b/c)**.5*(a+b+c)for x in[a,b,c])

Try it online!
I took Surculose Sputum's formula and solution and wrote the three summands in a closer-to-symmetric form like:
$$(a+b+c)\sqrt{2-\frac{a^2+b^2-c^2}{ab}}$$
The idea is that we want the summand to be as symmetric in \$a,b,c\$ as possible so that we can iterate a single variable \$x\$ over \$a,b,c\$ to produce each summand.
To this end, we write the core term $$\frac{a^2+b^2-c^2}{ab}$$ as the somewhat clunky
$$\frac{a^2+b^2+c^2-2c^2}{abc}\cdot c$$
so that we can write it in this symmetric form:
$$\frac{a^2+b^2+c^2-2x^2}{abc}\cdot x$$
Substituting \$x=a\$, \$x=b\$, and \$x=c\$ gives the three respective summands.
Perhaps there's a better way to put this fraction into a near-symmetric form than doing so for the numerator and denominator individually. We can split it up as $$a/b+b/a-c^2/(ab)$$
but I don't see where to go from there.

dc, 68 bytes
9k?scsbsa[lad*lblc-d*-lblc*/v]dsFxlalbsasblFxlalcsasclFx++lalblc++*p

Try it online!
Or check out all the test cases.
This is a direct implementation of Surculose Sputum's answer (the original iterative one), which is the type of formula that dc ("desk calculator") can be pretty good for!
Explanation:
9k     Set precision to 9 decimal places.
?      Read input line (push a, b, and c on the stack).
scsbsa Save the input numbers in registers a, b, and c.
[      Start a macro.
       This macro takes the values in registers a, b, and c,
       and computes the first square root in the formula,
       leaving that result on the stack, as follows:
  lad*   Push a^2.
  lblc-  Push b-c.
  d*     Replace b-c at the top of the stack with (b-c)^2.
  -      Replace the top 2 items on the stack with a^2-(b-c)^2.
  lblc*  Push b*c.
  /      Divide to compute the formula under the radical sign.
  v      Compute the square root.
]      End of macro.
dsFx       Save macro for later use under the name F, and also run it now.
lalbsasb   Swap registers a and b.
lFx        Call macro F to compute the second square root.
lalcsasc   Swap registers a and c.
lFx        Call macro F to compute the third square root.
++         Add the three square roots.
lalblc++   Compute a+b+c.
*          Multiply a+b+c by the sum of the square roots.
p          Print the result.

Desmos, 1455 bytes

Try it online! Link is Desmos. Interactive! Click and drag triangle points.
Obviously this answer is not going for shortest, I just wanted to show off an interactive demo. The bytes score was calculated by taking the length of concatenating all of the LaTeX from each formula in the calculator used to compute the perimeter (formulas used for interactive components were not counted).

05AB1E, 15 bytes
Port of Surculose Seputum's Python solution
œεnÆy¦P/}ÌtO*O;

Try it online!

Io, 104 bytes
Port of Surculose Sputum's answer.
f :=method(a,b,c,n,if(n!=0,(a+b+c)*(c*c/a/b-a/b-b/a+2)**.5+f(b,c,a,n-1),n))
g :=method(a,b,c,f(a,b,c,3))

Try it online!

Wolfram Mathematica, 99 bytes
(#1+#2+#3)(Sqrt[(#1^2-(#2-#3)^2)/#2/#3]+Sqrt[(#2^2-(#1-#3)^2)/#1/#3]+Sqrt[(#3^2-(#1-#2)^2)/#1/#2])&

Try it online!
I am pretty sure that this code can be improved. But I wasn't able to wrap my head around it. So I just post this in the hope of learning something new from more experienced users.

(#1+#2+#3) can currently be replaced by Plus@##. It might or might not be a good idea to store the parameters in short-named variables or even use a proper function declaration.

APL (Dyalog Extended), 45 44 bytes
+/×{+/{a b c←⍵⋄√(a×a÷b×c)+2-(⊢+÷)b÷c}⌽∘⍵¨⍳3}

Try it online!
Bubbler has a 27 byte solution with a complete train, but I think it deserves it's own answer.
This is a port of Surculose Suptum's formula, simplified by Kevin Cruijssen.
-1 byte from dzaima.

Java 8, 104 bytes
(a,b,c)->{double r=0,t,n=3;for(;n-->0;t=a,a=b,b=c,c=t)r+=(a+b+c)*Math.sqrt(c*c/a/b-a/b-b/a+2);return r;}

Iterative port of @SurculoseSputum's Python answer, so make sure to upvote him!
Try it online.
Explanation:
(a,b,c)->{                  // Method with double as all three parameters and return-type
  double r=0,               // Result-sum, starting at 0
         t,                 // Temp-double
  n=3;for(;n-->0            // Loop 3 times:
          ;                 //   After every iteration:
           t=a,a=b,b=c,c=t) //    Rotate `a,b,c` to `b,c,a` respectively
    r+=                     //  Increase the result-sum by:
      (a+b+c)               //   The sum of `a,b,c`
      *Math.sqrt(           //   Multiplied by the square-root of:
         c*c                //    `c` squared
            /a/b            //    Divided by both `a` and `b`
         -a/b               //    Minus `a` divided by `b`
         -b/a               //    as well as `b` divided by `a`
         +2);               //    Plus 2
  return r;}                //  After the loop, return the result-sum

Or as a single formula:
$$p = (a+b+c)\sqrt{c^2\div a\div b-\frac{a}{b}-\frac{b}{a}+2}$$
$$+(a+b+c)\sqrt{a^2\div b\div c-\frac{b}{c}-\frac{c}{b}+2}$$
$$+(a+b+c)\sqrt{b^2\div c\div a-\frac{c}{a}-\frac{a}{c}+2}$$

Charcoal, 24 bytes
Ｉ×ΣθΣＥθ₂⁻²∕×ι⁻ΣＸθ²⊗×ιιΠθ

Try it online! Link is to verbose version of code. Port of @xnor's formula. Explanation:
     Ｅθ                     Map over sides
              ΣＸθ²          Sum of sides squared
             ⁻              Subtract
                   ×ιι      Square of current side
                  ⊗         Doubled
           ×ι               Multiply by current side
          ∕           Πθ    Divide by product of sides
        ⁻²                  Subtract from 2
       ₂                    Square root
    Σ                       Take the sum
 ×                          Multiplied by
  Σθ                        Sum of sides
Ｉ                           Cast to string for implicit print

Unfortunately SquareRoot doesn't seem to vectorise so I have to do that inside the Map which makes it marginally less efficient.

22 bytes using the newer version of Charcoal on ATO: Ｉ×ΣθΣ₂⁻²∕×θ⁻ΣＸθ²⊗Ｘθ²Πθ Attempt This Online Link is to verbose version of code.

JavaScript (ES7), 62 bytes
Now a port of Surculose Sputum's answer.
f=(a,b,c,n)=>n^3&&(a+b+c)*(c*c/a/b-a/b-b/a+2)**.5+f(b,c,a,-~n)

Try it online!


text:
Code golfing my guess the number game with feedback in NS-HUBASIC - Can it be code golfed any further?
The player has to keep guessing a number from 1 to 10 until they guess the correct number to win the game. If they make an incorrect guess, they're told if their guess was too low or too high.
Each line has to render below the previous line for me to accept the solution as the new code for the game (However, you can still share any solutions that break that rule.). For example, no lines can be rendered over other lines, such as "CORRECT." over "TOO LOW." or "TOO HIGH.".
Here's the code:
0N=RND(10)+1:DIMT$(2):T$(0)="CORRECT.":T$(1)="TOO LOW.":T$(2)="TOO HIGH.":F.T=0TO0:I."WHAT'S MY NUMBER? (1-10) ",G:T=G<>N:?T$(-(G>N)-T):N.

As for how I'm running NS-HUBASIC code, I'm doing it in Family BASIC V3.0, which I'm running under Nestopia v1.40.
If you need any documentation, you can find it here: https://gamefaqs.gamespot.com/nes/938747-family-basic-v3/faqs/59317

I estimate a quite small number of NS-HUBASIC coders here. Maybe you could recommend some online documentation and/or environment/emulator so others could try jumping in.

Where is the online documentation for NS-HUBASIC?

I just added a link to some documentation for NS-HUBASIC, which is online, to the initial post. But here's the link here (I hope it'll make it more convenient for you to find the link): https://gamefaqs.gamespot.com/nes/938747-family-basic-v3/faqs/59317

The ROM can be tried online here, but it seems to be complaining about the keyboard not being plugged and I don't think there's a way to enable it in this emulator. (Or is it?)

 134  133 characters
Note: I don't know for sure whether a line-break counts as 1 character.
0N=RND(10)+1:DIMT$(2):T$(0)="TOO LOW.":T$(1)="CORRECT.":T$(2)="TOO HIGH."
1I."WHAT'S MY NUMBER? (1-10) ",G:?T$(SGN(G-N)+1):IF G-N T.1

Example output

I also asked this question at NesDev (I had found no answers where I had asked it before (NesDev (Link) and Famicom World (Link 1) and (Link 2) are those places), so I asked it at StackOverflow). Controllerhead there helped me get here, down from 133 characters to 131 characters. Code: 0N=RND(10)+1:F.T=0TO0:I."WHAT'S MY NUMBER? (1-10) ",G:T=G<>N:RES.0:F.I=0TO(-(G>N)-T):READC$:N.:?C$:N.:D.CORRECT.,TOO LOW.,TOO HIGH.

@NiallWard I clearly couldn't have gone that far, as the above code snippet is the first (and perhaps the last) thing I ever wrote in this language. :-)

I thank you, Controllerhead and anyone else who may have helped me get the program to the length it's at now for the help.


text:
Mask values in a .env file for a screencast
Let's say I have a .env file with the following contents:
CF_WORKERS_ACCOUNT_ID=abcdef34632114
CF_WORKERS_API_TOKEN=abcdef34632114def3463def3463
FAB_DEV_ZONE_ID=434932843272439874329

I'm doing a screencast, and I want to quickly cat .env to show what's in the file, without broadcasting the exact values, since they're secret.
What I want is a one-line unix command (I'm on OSX personally) that gives me:
> cat .env | some_command
CF_WORKERS_ACCOUNT_ID=••••••••••••••
CF_WORKERS_API_TOKEN=••••••••••••••••••••••••••••
FAB_DEV_ZONE_ID=•••••••••••••••••••••

A little thing, but would be neat!
My best attempt is cat .env | ruby -pe 'k,v=$_.split("=");$_="#{k}=#{v.gsub(/./,"•")}"' but I'm sure it can be shorter...

Welcome to the site.  As a challenge this currently underspecified.  Since [tag:code-golf] is a competition you must precisely lay out what the input can be and what the output must be, beyond just a general idea.

So basically we have to take input as a file with key=value pairs and output it with values replaced by these Unicode middle dots? Does it have to be an Unix command? (such restrictions are really uncommon here and will likely lead to accusations of being extremely evil)

Are the values before the = guaranteed to be uppercase and _ and/or the characters after the = guaranteed to be lowercase alphanumeric? The example seems to suggest that. If not, I assume printable ASCII is allowed on either side, with the sole exception of the single = (or can the password contain = as well)?

05AB1E, 12 bytes
Uhh, I'd just solve it anyway...
'=¡`g'•иJ'=ý

Try it online!
Explanation
'=¡          Split by equal signs
   `         Put both parts onto the stack
    g        Find the length of the second item
     '•иJ    Repeat that many •'s
         '=ý Join by the equal sign

9 bytes with žjAuмS'•:, assuming the string before the = is always [A-Z_] and after always [a-z0-9] (I've asked OP to verify, so might not be valid.)

vim, 14 13 12 keystrokes, assuming you can somehow type •
Somehow matches 05AB1E.
:%norm$vT=r•

Assumes there is only one = character in a line.
Overly generic explanation:
:%norm        on every line do these normal mode commands
      $       go to the end of string
       vT=    select until but not including the previous =
          r•  replace with a nice unicode dot

just type these commands and don't forget not to save
Try it online! (with V)

Perl 5, 23 chars
1while s/(=.*)[^•]/$1•/

as in
cat .env | perl -ple'1while s/(=.*)[^•]/$1•/'

Try it online!

sed -E, 22 chars (26 bytes)
:a;s/(=.*)[^•]/\1•/;ta

Try it online!
This replaces every character after the first = with a •.
Your use case would be:
cat .env|sed -E ':a;s/(=.*)[^•]/\1•/;ta'
or
cat .env|sed ':a;s/\(=.*\)[^•]/\1•/;ta'
(which is one byte shorter as a shell command).
By the way, you can shorten this again if you change your command structure slightly:
sed ':a;s/\(=.*\)[^•]/\1•/;ta'<.env