List Only Child Categories Related to Entries
Having the need for a similar setup to yourself, I came up with a more efficient example below.

{% set entryIds = craft.entries.section('news').status('live').limit(null).ids() %}

{% set parentSlug = craft.request.getSegment(1) %}
{% set catParent = craft.categories.slug(parentSlug).first() %}

{% set categories = craft.categories.relatedTo({ sourceElement: entryIds }).groupId(1).limit(null).descendantOf(catParent).find() %}

{% nav category in categories %}
    &lt;li&gt;
        &lt;a href="#"&gt;{{ category.title }}&lt;/a&gt;
        {% ifchildren %}
            &lt;ul&gt;
                {% children %}
            &lt;/ul&gt;
        {% endifchildren %}
    &lt;/li&gt;
{% endnav %}