How do I limit the allowed taxonomy terms basing on the content type? I have two different content types, Computer and Chemistry, and taxonomy terms for all articles (content types) which store the methodology of the article. The taxonomy hierarchy is the following. 


Articles


Computer


Arithmetic (Term ID: 1)
DMA (Term ID: 2) // abbreviation for "Direct Memory Access"

Chemistry


NGE (Term ID: 3) // abbreviation for "Noble Gas Elements"
DMA (Term ID: 4) // abbreviation for "Dynamic Mechanical Analysis"




When users are creating or editing a node of type Chemistry, just NGE and DMA (whose ID is 4) should be allowed to select.

I only need one taxonomy vocabulary, since there are too many content types, and if I want to add a vocabulary for each of them, then it leads too many vocabularies; more importantly it removes the ability of freely navigating in different types using taxonomy hierarchy.

How do I limit the allowed taxonomy terms basing on the content type?
According to my choice you should use hook_form_alter to bind taxonomy list based on article type. 

function MY_MODULE_NAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'my_form_id') {
    $default_value = 0;
    $options = getArticles('Computer','Articles');
    $form['your_taxonomy_field_name'] = array(
      '#title' =&gt; t('Articlas'),
      '#type' =&gt; 'select',
      '#options' =&gt; $options,
      '#access' =&gt; 1,
      '#default_value' =&gt; $default_value,
      '#weight' =&gt; 1,
    );
  }
}
function getArticles($articleType,$vocabularyName) {
  //get the vocabulary
  $vocabulary = taxonomy_get_vocabularies();
  $vid = -1;
  foreach ($vocabulary as $item) {
    if ($item-&gt;name == $vocabularyName) {
      $vid = $item-&gt;vid;
    }
  }
  if ($vid != -1) {
    //get the parrent Term
    $query = new EntityFieldQuery;
    $result = $query
      -&gt;entityCondition('entity_type', 'taxonomy_term')
      -&gt;propertyCondition('name', $articleType)
      -&gt;propertyCondition('vid', $vid)
      -&gt;execute();
    $parrent_tid = array_shift($result['taxonomy_term'])-&gt;tid;
    //return children
    return taxonomy_get_children($parrent_tid);
  }
  return NULL;
}