<p>A transaction input is an unspent transaction output from an <em>existing</em> transaction.     </p>

<p>A transaction's output is the creation of an unspent transaction output from one or more inputs. </p>

<p>It's computationally infeasible because an input MUST exist before an output.     </p>

<p>The tricky part is the terminology, input vs output. They are both outputs but in different states.  Essentially everything is an output existing in the ever-changing Unspent Transaction Output (UTXO) set, inputs are simply referring to a previous UTXO. An output cannot exist without coming from an input, which can be validated all the way back to its <a href="https://bitcoin.org/en/glossary/coinbase-transaction" rel="nofollow noreferrer">coinbase transaction</a>. </p>

<p>EDIT:<br>
To dig a little further why it's technically not possible, when building a basic raw bitcoin transaction you need the transaction ID, and N out value of the input being used. Creating a transaction with an invalid or non-existent transaction ID would be rejected if broadcast to the network. Since we know an input must come before an output, one cannot refer to its input as its own output as the transaction ID would not exist yet. </p>

<p><a href="https://www.youtube.com/watch?v=jWKuqP-zTFk" rel="nofollow noreferrer">How To Create a Raw Transaction</a></p>

CC BY-SA 4.0
2018-08-26T15:49:21.433Z
2018-08-26T16:36:05.853Z
2018-08-26T16:36:05.853Z
m1xolyd1an
<p>It was asked to us as in an assignment : Explain why it is computationally infeasible for anyone to generate a Bitcoin that refers its own output as an input. 
Inspite of searching throught various resources,I was unable to find a satisfactory answer to it.</p>

CC BY-SA 4.0
2018-08-26T15:22:58.733Z
If it is possible please post the exact assignment, because your question does not really make sense. How do you "generate" a bitcoin? What is the output or the input of a bitcoin? Are you talking about a transaction?
Bobface
CC BY-SA 4.0
2018-08-26T15:35:00.253Z
Based on the title I think that's a typo, I think he meant "generate a bitcoin *transaction* ..."
m1xolyd1an
CC BY-SA 4.0
2018-08-26T16:11:04.273Z
Yeah in the description it should be Bitcoin ‘transaction’
Maulik Chaudhary
<transactions>
Why a Bitcoin transaction that refers its own output as an input is computationally infeasible?
Maulik Chaudhary
# Why a Bitcoin transaction that refers its own output as an input is computationally infeasible?

(Asked by: username_0 on 2018-08-26)

It was asked to us as in an assignment : Explain why it is computationally infeasible for anyone to generate a Bitcoin that refers its own output as an input.
Inspite of searching throught various resources,I was unable to find a satisfactory answer to it.

**Tags:** transactions

> **Comments:**
> **username_1**: If it is possible please post the exact assignment, because your question does not really make sense. How do you "generate" a bitcoin? What is the output or the input of a bitcoin? Are you talking about a transaction?  
> **username_2**: Based on the title I think that's a typo, I think he meant "generate a bitcoin *transaction* ..."  
> **username_0**: Yeah in the description it should be Bitcoin ‘transaction’  

---

## 1 answers

### Answer by username_2 on 2018-08-26. Score: 1

A transaction input is an unspent transaction output from an *existing* transaction.

A transaction's output is the creation of an unspent transaction output from one or more inputs.

It's computationally infeasible because an input MUST exist before an output.

The tricky part is the terminology, input vs output. They are both outputs but in different states. Essentially everything is an output existing in the ever-changing Unspent Transaction Output (UTXO) set, inputs are simply referring to a previous UTXO. An output cannot exist without coming from an input, which can be validated all the way back to its [coinbase transaction](https://bitcoin.org/en/glossary/coinbase-transaction).

EDIT:  
To dig a little further why it's technically not possible, when building a basic raw bitcoin transaction you need the transaction ID, and N out value of the input being used. Creating a transaction with an invalid or non-existent transaction ID would be rejected if broadcast to the network. Since we know an input must come before an output, one cannot refer to its input as its own output as the transaction ID would not exist yet.

[How To Create a Raw Transaction](https://www.youtube.com/watch?v=jWKuqP-zTFk)


---

